// Path: src/java/org/stathissideris/ascii2image/core/RenderingOptions.java
// public class RenderingOptions {
// 
// 	private HashMap<String, CustomShapeDefinition> customShapes;
// 	
// 	private boolean dropShadows = true;
// 	private boolean renderDebugLines = false;
// 	private boolean antialias = true;
//     private boolean fixedSlope = false;
// 
// 	private int cellWidth = 10;
// 	private int cellHeight = 14;
// 	
// 	private float scale = 1;
// 	
// 	private Color backgroundColor = Color.white;
// 
// 	public enum ImageType { PNG, SVG };
// 
// 	private ImageType imageType = ImageType.PNG;
// 
// 	public ImageType getImageType() { return imageType; }
// 	public void setImageType(ImageType type) { imageType = type; }
// 
// 	private String fontFamily = "Courier";
// 	private String fontURL = null;
// 
// 	public String getFontFamily() { return fontFamily; }
// 	public String getFontURL() { return fontURL; }
// 	public void setFontURL(String url) { fontFamily = "Custom"; fontURL = url; }
// 
// 	public int getCellHeight() {
// 		return cellHeight;
// 	}
// 
// 	public int getCellWidth() {
// 		return cellWidth;
// 	}
// 
// 	public boolean dropShadows() {
// 		return dropShadows;
// 	}
// 
// 	public boolean renderDebugLines() {
// 		return renderDebugLines;
// 	}
// 
// 	public float getScale() {
// 		return scale;
// 	}
// 
// 	public void setDropShadows(boolean b) {
// 		dropShadows = b;
// 	}
// 
// 	public void setRenderDebugLines(boolean b) {
// 		renderDebugLines = b;
// 	}
// 
// 	public void setScale(float f) {
// 		scale = f;
// 		cellWidth *= scale;
// 		cellHeight *= scale;
// 	}
// 
// 	public boolean performAntialias() {
// 		return antialias;
// 	}
// 
// 	public void setAntialias(boolean b) {
// 		antialias = b;
// 	}
// 
// 	public Color getBackgroundColor() {
// 		return backgroundColor;
// 	}
// 
// 	public void setBackgroundColor(Color backgroundColor) {
// 		this.backgroundColor = backgroundColor;
// 	}
// 	
// 	public boolean needsTransparency() {
// 		return backgroundColor.getAlpha() < 255;
// 	}
// 
// 	/**
//      * Should the sides of trapezoids and parallelograms have fixed width (false, default)
//      * or fixed slope (true)?
//      * @return true for fixed slope, false for fixed width
//      */
//     public boolean isFixedSlope() {
//         return fixedSlope;
//     }
// 
//     /**
//      * Should the sides of trapezoids and parallelograms have fixed width (false, default)
//      * or fixed slope (true)?
//      * @param b true for fixed slope, false for fixed width
//      */
//     public void setFixedSlope(boolean b) {
//         this.fixedSlope = b;
//     }
// }


import java.awt.Color;
import java.awt.Rectangle;
import java.awt.geom.GeneralPath;
import java.awt.geom.Rectangle2D;
import java.awt.geom.Ellipse2D;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import org.stathissideris.ascii2image.core.RenderingOptions;
import org.stathissideris.ascii2image.text.*;
			return makeTrapezoidPath(diagram, options, true);
		}

		if(getType() == TYPE_TRAPEZOID && points.size() == 4){
			return makeTrapezoidPath(diagram, options, 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){
// Path: src/java/org/stathissideris/ascii2image/core/RenderingOptions.java
// public class RenderingOptions {
// 
// 	private HashMap<String, CustomShapeDefinition> customShapes;
// 	
// 	private boolean dropShadows = true;
// 	private boolean renderDebugLines = false;
// 	private boolean antialias = true;
//     private boolean fixedSlope = false;
// 
// 	private int cellWidth = 10;
// 	private int cellHeight = 14;
// 	
// 	private float scale = 1;
// 	
// 	private Color backgroundColor = Color.white;
// 
// 	public enum ImageType { PNG, SVG };
// 
// 	private ImageType imageType = ImageType.PNG;
// 
// 	public ImageType getImageType() { return imageType; }
// 	public void setImageType(ImageType type) { imageType = type; }
// 
// 	private String fontFamily = "Courier";
// 	private String fontURL = null;
// 
// 	public String getFontFamily() { return fontFamily; }
// 	public String getFontURL() { return fontURL; }
// 	public void setFontURL(String url) { fontFamily = "Custom"; fontURL = url; }
// 
// 	public int getCellHeight() {
// 		return cellHeight;
// 	}
// 
// 	public int getCellWidth() {
// 		return cellWidth;
// 	}
// 
// 	public boolean dropShadows() {
// 		return dropShadows;
// 	}
// 
// 	public boolean renderDebugLines() {
// 		return renderDebugLines;
// 	}
// 
// 	public float getScale() {
// 		return scale;
// 	}
// 
// 	public void setDropShadows(boolean b) {
// 		dropShadows = b;
// 	}
// 
// 	public void setRenderDebugLines(boolean b) {
// 		renderDebugLines = b;
// 	}
// 
// 	public void setScale(float f) {
// 		scale = f;
// 		cellWidth *= scale;
// 		cellHeight *= scale;
// 	}
// 
// 	public boolean performAntialias() {
// 		return antialias;
// 	}
// 
// 	public void setAntialias(boolean b) {
// 		antialias = b;
// 	}
// 
// 	public Color getBackgroundColor() {
// 		return backgroundColor;
// 	}
// 
// 	public void setBackgroundColor(Color backgroundColor) {
// 		this.backgroundColor = backgroundColor;
// 	}
// 	
// 	public boolean needsTransparency() {
// 		return backgroundColor.getAlpha() < 255;
// 	}
// 
// 	/**
//      * Should the sides of trapezoids and parallelograms have fixed width (false, default)
//      * or fixed slope (true)?
//      * @return true for fixed slope, false for fixed width
//      */
//     public boolean isFixedSlope() {
//         return fixedSlope;
//     }
// 
//     /**
//      * Should the sides of trapezoids and parallelograms have fixed width (false, default)
//      * or fixed slope (true)?
//      * @param b true for fixed slope, false for fixed width
//      */
//     public void setFixedSlope(boolean b) {
//         this.fixedSlope = b;
//     }
// }


// Path: src/java/org/stathissideris/ascii2image/graphics/DiagramShape.java
import java.awt.Color;
import java.awt.Rectangle;
import java.awt.geom.GeneralPath;
import java.awt.geom.Rectangle2D;
import java.awt.geom.Ellipse2D;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import org.stathissideris.ascii2image.core.RenderingOptions;
import org.stathissideris.ascii2image.text.*;

			return makeTrapezoidPath(diagram, options, true);
		}

		if(getType() == TYPE_TRAPEZOID && points.size() == 4){
			return makeTrapezoidPath(diagram, options, 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);