http://www.jpicedt.org

jpicedt.format.output.eepic
Class AbstractCurveFormatter

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

public class AbstractCurveFormatter
extends AbstractFormatter

Format an AbstractCurve, or any subclass of it, to the eepic format. Basically, a single \\path macro is used if the curve is a polygon, so that filling works properly. Otherwise we make use of \\qbezier, \\path and/or \\dashline macros.

Since:
jpicedt 1.4
Version:
$Id: AbstractCurveFormatter.java,v 1.11 2013/03/27 07:11:05 vincentb1 Exp $

Author:
Sylvain Reynal

Field Summary
protected  AbstractCurve curve
          the Element this formater acts upon
protected  EepicFormatter factory
           
 
Constructor Summary
AbstractCurveFormatter(AbstractCurve curve, EepicFormatter factory)
           
 
Method Summary
 String format()
          Returns a string representing this AbstractCurve using \\line and \\qbezier LaTeX macros only.
protected  String formatCurve(StringBuffer buf)
          formats curves containing at least one non-straight segment
protected  String formatPolygon(StringBuffer buf)
          Formats curves containing straight segments only
 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

curve

protected AbstractCurve curve
the Element this formater acts upon


factory

protected EepicFormatter factory
Constructor Detail

AbstractCurveFormatter

public AbstractCurveFormatter(AbstractCurve curve,
                              EepicFormatter 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()
Returns a string representing this AbstractCurve using \\line and \\qbezier LaTeX macros only. Dashed style is allowed if all segments are straight, since \\qbezier does not support this style.


formatCurve

protected String formatCurve(StringBuffer buf)
formats curves containing at least one non-straight segment


formatPolygon

protected String formatPolygon(StringBuffer buf)
Formats curves containing straight segments only


http://www.jpicedt.org

Submit a bug : syd@jpicedt.org