http://www.jpicedt.org

jpicedt.format.output.pstricks
Class AbstractCurveFormatter

java.lang.Object
  extended by jpicedt.format.output.pstricks.AbstractCurveFormatter
All Implemented Interfaces:
PstricksConstants, Formatter, PicObjectConstants

public class AbstractCurveFormatter
extends java.lang.Object
implements Formatter, PicObjectConstants, PstricksConstants

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.14.2.1 2007/09/02 11:55:13 reynal Exp $
Author:
Vincent Guirardel, Sylvain Reynal

Field Summary
protected  AbstractCurve curve
          the Element this formatter acts upon
protected  PstricksFormatter factory
          the producing factory
 
Fields inherited from interface jpicedt.graphic.model.PicObjectConstants
ARROW_GLOBAL_SCALE_LENGTH, ARROW_GLOBAL_SCALE_WIDTH, ARROW_INSET_SCALE, ARROW_LENGTH_SCALE, ARROW_WIDTH_LINEWIDTH_SCALE, ARROW_WIDTH_MINIMUM_MM, BRACKET_LENGTH_SCALE, CROSSHATCH, CROSSHATCH_FILLED, DASH_OPAQUE, DASH_TRANSPARENT, DASH1, DASH2, DASH3, DASHED, DIMEN, DOT_SEP, DOT_SEP1, DOT_SEP2, DOT_SEP3, DOTTED, DOUBLE_COLOR, DOUBLE_LINE, DOUBLE_SEP, FILL_COLOR, FILL_STYLE, HATCH_ANGLE, HATCH_COLOR, HATCH_SEP, HATCH_WIDTH, HLINES, HLINES_FILLED, INNER, LEFT_ARROW, LINE_COLOR, LINE_STYLE, LINE_WIDTH, MIDDLE, NONE, OUTER, OVER_STRIKE, OVER_STRIKE_COLOR, OVER_STRIKE_WIDTH, POLYDOTS_ANGLE, POLYDOTS_CIRCLE, POLYDOTS_DISK, POLYDOTS_PENTAGON, POLYDOTS_PENTAGON_FILLED, POLYDOTS_PLUS, POLYDOTS_SCALE_H, POLYDOTS_SCALE_V, POLYDOTS_SIZE_LINEWIDTH_SCALE, POLYDOTS_SIZE_MINIMUM_MM, POLYDOTS_SQUARE, POLYDOTS_SQUARE_FILLED, POLYDOTS_STYLE, POLYDOTS_SUPERIMPOSE, POLYDOTS_TRIANGLE, POLYDOTS_TRIANGLE_FILLED, PS_POINT, PST_CUSTOM, RBRACKET_LENGTH_SCALE, RIGHT_ARROW, SHADOW, SHADOW_ANGLE, SHADOW_COLOR, SHADOW_SIZE, SOLID, TBAR_WIDTH_LINEWIDTH_SCALE, TBAR_WIDTH_MINIMUM_MM, TEXT_BOX_CIRCLE, TEXT_BOX_NO_FRAME, TEXT_BOX_OVAL, TEXT_BOX_RECTANGLE, TEXT_FRAME, TEXT_HALIGN_CENTER, TEXT_HALIGN_LEFT, TEXT_HALIGN_RIGHT, TEXT_HOR_ALIGN, TEXT_ROTATION, TEXT_VALIGN_BASELINE, TEXT_VALIGN_BOTTOM, TEXT_VALIGN_CENTER, TEXT_VALIGN_TOP, TEXT_VERT_ALIGN, VLINES, VLINES_FILLED
 
Fields inherited from interface jpicedt.format.output.pstricks.PstricksConstants
CR_LF, DEFAULT_FILE_WRAPPER_EPILOG, DEFAULT_FILE_WRAPPER_PROLOG, KEY_FILE_WRAPPER_EPILOG, KEY_FILE_WRAPPER_PROLOG, PST_ARROWS, PST_ARROWS_LEFT, PST_ARROWS_RIGHT, PST_COLORNAMES, PST_COLORS, RESCALING_TEX_FUNCTION
 
Constructor Summary
AbstractCurveFormatter(AbstractCurve curve, PstricksFormatter factory)
           
 
Method Summary
 java.lang.String format()
          Return a String representing this curve in the PsTricks format.
protected  java.lang.String formatCurve()
          this is a convenience call to either formatPsCustom() or formatPsBezier() or formatPsLine().
protected  java.lang.String formatPsBezier()
          If the curve contains a single Bezier segment: \\psbezier...
protected  java.lang.String formatPsCurve()
          Format for pscurve
protected  java.lang.String formatPsCustom()
          If the curve has more than one segment, and it's not a polygon.
protected  java.lang.String formatPsDots()
          \\psdots(x1,y1)...(xn,yn)
protected  java.lang.String formatPsLine()
          Polygon: \\psline...
 
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 formatter acts upon


factory

protected PstricksFormatter factory
the producing factory

Constructor Detail

AbstractCurveFormatter

public AbstractCurveFormatter(AbstractCurve curve,
                              PstricksFormatter factory)
Method Detail

format

public java.lang.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.

Specified by:
format in interface Formatter

formatCurve

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


formatPsBezier

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


formatPsLine

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


formatPsCurve

protected java.lang.String formatPsCurve()
Format for pscurve

Since:
jPicEdt 1.4pre5

formatPsCustom

protected java.lang.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 java.lang.String formatPsDots()
\\psdots(x1,y1)...(xn,yn)


http://www.jpicedt.org

Submit a bug : syd@jpicedt.org