net.sf.jtikz
Class TikzGraphics2D
- java.lang.Object
-
- java.awt.Graphics
-
- java.awt.Graphics2D
-
- net.sf.jtikz.AbstractGraphicsInterface
-
- net.sf.jtikz.TikzGraphics2D
-
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
public class TikzGraphics2D extends AbstractGraphicsInterface
A Graphics2D replacement for outputting in TikZ/PGF. Here is an example:TikzGraphics2D t = new TikzGraphics2D(); panel.paint(t);
or, alternatively,t.paintComponent(frame);
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringREV_DATEThe revision date for this version of JTikZ.static java.lang.StringVERSIONThe version of JTikZ.-
Fields inherited from class net.sf.jtikz.AbstractGraphicsInterface
verbose
-
-
Constructor Summary
Constructors Constructor and Description TikzGraphics2D()Creates a new TikzGraphics2D object that will output the code tosystem.out.TikzGraphics2D(java.io.OutputStream os)Creates a new TikzGraphics2D object that will output the code to the given output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleandrawImage(java.awt.Image img, java.awt.geom.AffineTransform xform, java.awt.image.ImageObserver obs)voiddrawRenderableImage(java.awt.image.renderable.RenderableImage img, java.awt.geom.AffineTransform xform)voiddrawRenderedImage(java.awt.image.RenderedImage image, java.awt.geom.AffineTransform xform)java.lang.StringtoTeX(java.lang.String s)Converts an arbitrary string to TeX.-
Methods inherited from class net.sf.jtikz.AbstractGraphicsInterface
addRenderingHint, addRenderingHints, clearRect, clip, clipRect, close, copyArea, create, create, dispose, draw, drawArc, drawGlyphVector, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, drawString, drawString, drawString, fill, fillArc, fillOval, fillPolygon, fillPolygon, fillRect, fillRoundRect, flush, getBackground, getClip, getClipBounds, getColor, getComposite, getDeviceConfiguration, getFont, getFontMetrics, getFontMetrics, getFontRenderContext, getPaint, getRenderingHint, getRenderingHints, getStroke, getTransform, hit, paintComponent, rotate, rotate, scale, setBackground, setClip, setClip, setColor, setComposite, setFont, setPaint, setPaintMode, setRenderingHint, setRenderingHints, setStroke, setTransform, setXORMode, shear, transform, translate, translate
-
-
-
-
Field Detail
-
VERSION
public static final java.lang.String VERSION
The version of JTikZ.- See Also:
- Constant Field Values
-
REV_DATE
public static final java.lang.String REV_DATE
The revision date for this version of JTikZ.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TikzGraphics2D
public TikzGraphics2D()
Creates a new TikzGraphics2D object that will output the code tosystem.out.
-
TikzGraphics2D
public TikzGraphics2D(java.io.OutputStream os)
Creates a new TikzGraphics2D object that will output the code to the given output stream. Ifosisnullthen it will default tosystem.out.
-
-
Method Detail
-
toTeX
public java.lang.String toTeX(java.lang.String s)
Converts an arbitrary string to TeX. This will strip/replace/escape all necessary TeX commands. For example, "\n" will be replaced by "\\".
-
drawRenderedImage
public void drawRenderedImage(java.awt.image.RenderedImage image, java.awt.geom.AffineTransform xform)- Overrides:
drawRenderedImagein classAbstractGraphicsInterface
-
drawImage
public boolean drawImage(java.awt.Image img, java.awt.geom.AffineTransform xform, java.awt.image.ImageObserver obs)- Specified by:
drawImagein classAbstractGraphicsInterface
-
drawRenderableImage
public void drawRenderableImage(java.awt.image.renderable.RenderableImage img, java.awt.geom.AffineTransform xform)- Specified by:
drawRenderableImagein classAbstractGraphicsInterface
-
-
DataMelt 3.0 © DataMelt by jWork.ORG