jfig.utils
Class FilteredFigWriter

java.lang.Object
  extended byjfig.objects.FigWriter
      extended byjfig.utils.FilteredFigWriter

public class FilteredFigWriter
extends FigWriter

write FIG files with special color options.

FilteredFigWriter writes jfig drawings in FIG 3.1/3.2 file format, but with the option to change colors. One use is to create a black and white copy from a colored drawing for printing on a non-color printer. Another use is to write printable versions of HADES circuit schematics.

Currently, the following color options are possible:


Field Summary
static int BLACK_WHITE
           
protected  int colorOption
           
static int FULL_COLORS
           
static int IO_COLORS
           
 
Fields inherited from class jfig.objects.FigWriter
currentObject
 
Constructor Summary
FilteredFigWriter()
          construct an empty FilteredFigWriter.
 
Method Summary
 int getAreaFill(FigAttribs attribs)
           
 int getColorOption()
           
 int getFillColorIndex(FigAttribs attribs)
           
 int getLineColorIndex(FigAttribs attribs)
           
 void message(java.lang.String msg)
           
 void setColorOption(int c)
           
 java.lang.String toString()
          toString() - the usual info method
 int write_fig31_file(java.io.PrintWriter pw, boolean top_level, java.util.Enumeration OE)
           
 
Methods inherited from class jfig.objects.FigWriter
fake_fig32_controlpoints, fig_scale, fig_scale, getArcDirection, getBackwardArrowFlag, getCapStyle, getDepth, getEllipseAngle, getEllipseDirection, getFont, getFontAngle, getFontFlags, getFontSize, getForwardArrowFlag, getHexString, getJoinStyle, getLineStyle, getLineThickness, getLineThickness, getPenStyle, getRadius, getStyleVal, getTextHeight, getTextLength, reset_debug, set_debug, setResolution, write_arrow_line, write_fig31_arc, write_fig31_cpointline, write_fig31_ellipse, write_fig31_file, write_fig31_file, write_fig31_header, write_fig31_object_comment, write_fig31_pointline, write_fig31_polyline, write_fig31_pseudocolors, write_fig31_rectangle, write_fig31_spline, write_fig31_text, write_fig32_header, write_jfig_trigger, writeAsResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

colorOption

protected int colorOption

FULL_COLORS

public static final int FULL_COLORS
See Also:
Constant Field Values

IO_COLORS

public static final int IO_COLORS
See Also:
Constant Field Values

BLACK_WHITE

public static final int BLACK_WHITE
See Also:
Constant Field Values
Constructor Detail

FilteredFigWriter

public FilteredFigWriter()
construct an empty FilteredFigWriter.

Method Detail

setColorOption

public void setColorOption(int c)

getColorOption

public int getColorOption()

getLineColorIndex

public int getLineColorIndex(FigAttribs attribs)
Overrides:
getLineColorIndex in class FigWriter

getFillColorIndex

public int getFillColorIndex(FigAttribs attribs)
Overrides:
getFillColorIndex in class FigWriter

getAreaFill

public int getAreaFill(FigAttribs attribs)
Overrides:
getAreaFill in class FigWriter

write_fig31_file

public int write_fig31_file(java.io.PrintWriter pw,
                            boolean top_level,
                            java.util.Enumeration OE)

message

public void message(java.lang.String msg)

toString

public java.lang.String toString()
toString() - the usual info method