http://www.jpicedt.org

jpicedt.format.output.pstricks
Class AbstractCurveFormatter

java.lang.Object
  extended by jpicedt.graphic.io.formatter.AbstractFormatter
      extended by jpicedt.format.output.pstricks.AbstractCurveFormatter
All Implemented Interfaces:
Formatter

public class AbstractCurveFormatter
extends AbstractFormatter

Format an AbstractCurve, or any subclass of it, using PsTricks macros. These are "rendered" to PsTricks using a \\pscustom command that lumps several Bezier curves together in a single Pstricks object.

Since:
jpicedt 1.4
Version:
$Id: AbstractCurveFormatter.java,v 1.25 2013/03/27 07:09:35 vincentb1 Exp $
Author:
Vincent Guirardel, Sylvain Reynal

Field Summary
protected  AbstractCurve element
          the Element this formatter acts upon
protected  PstricksFormatter factory
          the producing factory
 
Constructor Summary
AbstractCurveFormatter(AbstractCurve element, PstricksFormatter factory)
           
 
Method Summary
 String format()
          Return a String representing this curve in the PsTricks format.
protected  String formatCurve()
          this is a convenience call to either formatPsCustom() or formatPsBezier() or formatPsLine().
protected  String formatPsBezier()
          If the curve contains a single Bezier segment: \\psbezier...
protected  String formatPsCurve()
          Format for pscurve
author: Vincent
protected  String formatPsCustom()
          If the curve has more than one segment, and it's not a polygon.
protected  String formatPsDots()
          \\psdots(x1,y1)...
protected  String formatPsLine()
          Polygon: \\psline...
 Element getElement()
          Renvoie l'Element sujet du formattage.
 
Methods inherited from class jpicedt.graphic.io.formatter.AbstractFormatter
revertedArrowsAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

protected AbstractCurve element
the Element this formatter acts upon


factory

protected PstricksFormatter factory
the producing factory

Constructor Detail

AbstractCurveFormatter

public AbstractCurveFormatter(AbstractCurve element,
                              PstricksFormatter factory)
Method Detail

getElement

public Element getElement()
Description copied from interface: Formatter
Renvoie l'Element sujet du formattage.

Since:
jPicEdt 1.6

format

public String format()
Return a String representing this curve in the PsTricks format. This delegates to either formatPsCustom() or formatPsDots() depending on the value of POLYDOTS_STYLE attribute.


formatCurve

protected String formatCurve()
this is a convenience call to either formatPsCustom() or formatPsBezier() or formatPsLine().


formatPsBezier

protected String formatPsBezier()
If the curve contains a single Bezier segment: \\psbezier...


formatPsLine

protected String formatPsLine()
Polygon: \\psline...


formatPsCurve

protected String formatPsCurve()
Format for pscurve
author: Vincent

Since:
jPicEdt 1.4pre5

formatPsCustom

protected String formatPsCustom()
If the curve has more than one segment, and it's not a polygon. \\pscustom[param]{arrows}{\\psline... or \\psbezier... \\closepath}


formatPsDots

protected String formatPsDots()
\\psdots(x1,y1)...(xn,yn)


http://www.jpicedt.org

Submit a bug : syd@jpicedt.org