cz.cuni.jagrlib
Class VCommand

java.lang.Object
  extended by cz.cuni.jagrlib.VectorCommand
      extended by cz.cuni.jagrlib.VCommand
All Implemented Interfaces:
java.io.Serializable

public class VCommand
extends VectorCommand

Concrete vector commands - individual commands are declared as inner classes of VCommand. The VCommand can be used as container for a linear sequence of VectorCommand objects (subroutine = group of commands).

Since:
0.02
See Also:
VCommand.java, interface VectorGraphics, Serialized Form

Nested Class Summary
 class VCommand.ArcTo
          Draw a circular arc (counterclockwise) and connects it to the current point.
 class VCommand.Clip
          Sets the current path as the clipping region (the current path is destroed - use VCommand.PushPath and VCommand.PopPath to restore it).
 class VCommand.ClosePath
          Closes the current path.
 class VCommand.CreateFont
          Creates the new font instance (from: family, style, size).
 class VCommand.CubicCurveTo
          Draw a cubic Bezier curve from the current point.
 class VCommand.DrawText
          Draws the given text using current font and current color.
 class VCommand.Fill
          Fills interior of the current path (the current path is destroed - use VCommand.PushPath and VCommand.PopPath to restore it).
 class VCommand.FontOrientation
          Changes the current font's orientation.
 class VCommand.GetFont
          Assigns the actual font (slot A) from the given slot.
 class VCommand.LineTo
          Draw line from tho current point to the given coordinate.
 class VCommand.MoveTo
          Moves current point to the given coordinate.
 class VCommand.NewPath
          Starts a new path (an old path is destroyed).
 class VCommand.PopPath
          Pops one item from the path stack and assigns the current path.
 class VCommand.PushPath
          Pushes the current path on the path stack.
 class VCommand.PutFont
          Puts the actual font (slot A) into the given slot.
 class VCommand.RArcTo
          Draw a circular arc (clockwise) and connects it to the current point.
 class VCommand.SetColor
          Sets the actual drawing color (optionally with alpha-component).
 class VCommand.SetFillCallback
          Sets the actual fill callback routine.
 class VCommand.SetFillStyle
          Sets the actual fill style.
 class VCommand.SetLineCallback
          Sets the actual stroke callback routine.
 class VCommand.SetLineStyle
          Sets the actual stroke style.
 class VCommand.SetLineWidth
          Sets the actual stroke width.
 class VCommand.Stroke
          Strokes the current path (the current path is destroed - use VCommand.PushPath and VCommand.PopPath to restore it).
 class VCommand.TextPath
          Generates path of the given text string and appends it to the current path.
 
Field Summary
protected  java.util.List<VectorCommand> commands
          List of sub-commands.
 
Fields inherited from class cz.cuni.jagrlib.VectorCommand
FILL_CALLBACK, FILL_DUMMY, FILL_HATCHL, FILL_HATCHR, FILL_SOLID, LINE_CALLBACK, LINE_DASH, LINE_DASHDOT, LINE_DOT, LINE_DUMMY, LINE_SOLID
 
Constructor Summary
VCommand()
           
 
Method Summary
 void execute(VectorGraphics out)
          Executes the command on the given VectorGraphics interface.
 void transform(java.awt.geom.AffineTransform t)
          Transforms the command using the given AffineTransform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commands

protected java.util.List<VectorCommand> commands
List of sub-commands.

Constructor Detail

VCommand

public VCommand()
Method Detail

transform

public void transform(java.awt.geom.AffineTransform t)
Transforms the command using the given AffineTransform.

Overrides:
transform in class VectorCommand
Parameters:
t - Affine transformation (3x2 matrix of doubles) or null.

execute

public void execute(VectorGraphics out)
             throws BadInterfaceException
Executes the command on the given VectorGraphics interface.

Overrides:
execute in class VectorCommand
Parameters:
out - Output vector interface.
Throws:
BadInterfaceException
See Also:
VectorGraphics