org.freehep.postscript
Class PSGState

java.lang.Object
  extended by org.freehep.postscript.PSObject
      extended by org.freehep.postscript.PSComposite
          extended by org.freehep.postscript.PSGState
All Implemented Interfaces:
Cloneable

public class PSGState
extends PSComposite

Graphics State Object for PostScript Processor, as defined in 4.2 Graphics State. Some of the state is kept in Graphics2D, some of it in BasicStroke

Version:
$Id: PSGState.java 8951 2006-09-12 21:44:14Z duns $
Author:
Mark Donszelmann

Field Summary
 
Fields inherited from class org.freehep.postscript.PSComposite
access, EXECUTE_ONLY, NONE, READ_ONLY, UNLIMITED
 
Fields inherited from class org.freehep.postscript.PSObject
name
 
Constructor Summary
PSGState(PSDevice device)
           
 
Method Summary
 PSPackedArray blackGeneration()
           
 Rectangle2D boundingBox()
           
 Shape charPath(int cc, float x, float y, boolean strokePath)
           
 void clip(Shape p)
           
 void clipPath()
           
 Object clone()
           
 float[] color()
           
 float[] color(String space)
           
 String colorSpace()
           
 BufferedImage convertToImage(int width, int height)
           
 PSObject copy()
           
 void copyInto(PSGState copy)
           
 String cvs()
           
 float[] dash()
           
 float dashPhase()
           
 boolean equals(Object o)
           
 void erasePage()
           
 boolean execute(OperandStack os)
           
 void fill()
           
 void fill(Shape s)
           
 double flat()
           
 void flattenPath()
           
 PSDictionary font()
           
 int getNumberOfColorSpaceComponents()
           
 AffineTransform getTransform()
           
 String getType()
           
 int hashCode()
           
 void image(RenderedImage image, AffineTransform at)
           
 void initClip()
           
 void initGraphics()
           
 int lineCap()
           
 int lineJoin()
           
 float lineWidth()
           
 float miterLimit()
           
 GeneralPath newPath()
           
 GeneralPath path()
           
 Point2D position()
           
 void rotate(double angle)
           
 void scale(double sx, double sy)
           
 void setBlackGeneration(PSPackedArray p)
           
 void setBoundingBox(Rectangle2D bb)
           
 void setColor(float[] color)
           
 void setColor(Paint paint)
           
 void setColor(Paint paint, Object[] params)
           
 boolean setColorSpace(String name)
           
 boolean setColorSpace(String name, Object[] params)
           
 void setDash(float[] dash, float dashPhase)
           
 void setFlat(double f)
           
 void setFont(PSDictionary font)
           
 void setLineCap(int cap)
           
 void setLineJoin(int join)
           
 void setLineWidth(double width)
           
 void setMiterLimit(float miterLimit)
           
 void setStrokeAdjust(boolean adjust)
           
 void setTransfer(PSPackedArray proc)
           
 void setTransform(AffineTransform at)
           
 void setUnderColorRemoval(PSPackedArray p)
           
 void show(GlyphVector gv, float x, float y)
           
 void stroke()
           
 void stroke(Shape s)
           
 void stroke(Shape s, AffineTransform m)
           
 boolean strokeAdjust()
           
 void strokePath()
           
static float[] toColor(String space, float[] rgb)
           
static float[] toRGB(float[] color, String space)
           
 String toString()
           
 PSPackedArray transfer()
           
 void transform(AffineTransform at)
           
 void translate(double tx, double ty)
           
 PSPackedArray underColorRemoval()
           
 
Methods inherited from class org.freehep.postscript.PSComposite
accessExecute, accessRead, accessWrite, changeAccess
 
Methods inherited from class org.freehep.postscript.PSObject
checkAndExecute, error, isExecutable, isLiteral, setExecutable, setLiteral, setName, toPrint
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PSGState

public PSGState(PSDevice device)
Method Detail

initGraphics

public void initGraphics()

convertToImage

public BufferedImage convertToImage(int width,
                                    int height)

erasePage

public void erasePage()

copyInto

public void copyInto(PSGState copy)

copy

public PSObject copy()
Specified by:
copy in class PSObject

fill

public void fill()

stroke

public void stroke()

strokePath

public void strokePath()

charPath

public Shape charPath(int cc,
                      float x,
                      float y,
                      boolean strokePath)

fill

public void fill(Shape s)

stroke

public void stroke(Shape s)

stroke

public void stroke(Shape s,
                   AffineTransform m)

show

public void show(GlyphVector gv,
                 float x,
                 float y)

image

public void image(RenderedImage image,
                  AffineTransform at)

position

public Point2D position()

translate

public void translate(double tx,
                      double ty)

rotate

public void rotate(double angle)

scale

public void scale(double sx,
                  double sy)

setTransform

public void setTransform(AffineTransform at)

transform

public void transform(AffineTransform at)

getTransform

public AffineTransform getTransform()

path

public GeneralPath path()

newPath

public GeneralPath newPath()

initClip

public void initClip()

clip

public void clip(Shape p)

clipPath

public void clipPath()

lineWidth

public float lineWidth()

setLineWidth

public void setLineWidth(double width)

dashPhase

public float dashPhase()

dash

public float[] dash()

setDash

public void setDash(float[] dash,
                    float dashPhase)

setLineCap

public void setLineCap(int cap)

lineCap

public int lineCap()

setLineJoin

public void setLineJoin(int join)

lineJoin

public int lineJoin()

setMiterLimit

public void setMiterLimit(float miterLimit)

miterLimit

public float miterLimit()

setStrokeAdjust

public void setStrokeAdjust(boolean adjust)

strokeAdjust

public boolean strokeAdjust()

execute

public boolean execute(OperandStack os)
Specified by:
execute in class PSObject

setFont

public void setFont(PSDictionary font)

font

public PSDictionary font()

setFlat

public void setFlat(double f)

flat

public double flat()

flattenPath

public void flattenPath()

setTransfer

public void setTransfer(PSPackedArray proc)

transfer

public PSPackedArray transfer()

setColorSpace

public boolean setColorSpace(String name)

setColorSpace

public boolean setColorSpace(String name,
                             Object[] params)

getNumberOfColorSpaceComponents

public int getNumberOfColorSpaceComponents()

colorSpace

public String colorSpace()

setColor

public void setColor(Paint paint)

setColor

public void setColor(Paint paint,
                     Object[] params)

setColor

public void setColor(float[] color)

toRGB

public static float[] toRGB(float[] color,
                            String space)

color

public float[] color()

color

public float[] color(String space)

toColor

public static float[] toColor(String space,
                              float[] rgb)

setBlackGeneration

public void setBlackGeneration(PSPackedArray p)

blackGeneration

public PSPackedArray blackGeneration()

setUnderColorRemoval

public void setUnderColorRemoval(PSPackedArray p)

underColorRemoval

public PSPackedArray underColorRemoval()

setBoundingBox

public void setBoundingBox(Rectangle2D bb)

boundingBox

public Rectangle2D boundingBox()

getType

public String getType()
Specified by:
getType in class PSObject

hashCode

public int hashCode()
Specified by:
hashCode in class PSObject

equals

public boolean equals(Object o)
Specified by:
equals in class PSObject

clone

public Object clone()
Specified by:
clone in class PSObject

cvs

public String cvs()
Specified by:
cvs in class PSObject

toString

public String toString()
Overrides:
toString in class PSObject


Copyright © 2000-2006 FreeHEP. All Rights Reserved.