public class SimpleSVGGraphics2D extends Graphics2D
Modifier and Type | Field and Description |
---|---|
static RenderingHints.Key |
KEY_ELEMENT_ATTMAP
Value is a Map of String to String of extra attributes on the next element drawn, one-shot, will be removed after rendering.
|
static RenderingHints.Key |
KEY_ELEMENT_CLASS
On the next element drawn, one-shot, will be removed after rendering.
|
static RenderingHints.Key |
KEY_ELEMENT_ID
On the next element drawn, one-shot, will be removed after rendering.
|
static RenderingHints.Key |
KEY_ELEMENT_INNERSVG
Put "inside" the next element drawn, one-shot, will be removed after rendering.
|
static RenderingHints.Key |
KEY_ELEMENT_TITLE
On the next element drawn, one-shot, will be removed after rendering.
|
static RenderingHints.Key |
KEY_SVG_CLASS
On the top svg element.
|
static RenderingHints.Key |
KEY_SVG_ID
On the top svg element.
|
static RenderingHints.Key |
KEY_SVG_TITLE
On the top svg element.
|
Constructor and Description |
---|
SimpleSVGGraphics2D(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
void |
addRenderingHints(Map<?,?> hints) |
void |
append(String s)
Graphics2D API bypass, advanced use only
|
void |
clearRect(int x,
int y,
int width,
int height) |
void |
clip(Shape s) |
void |
clipRect(int x,
int y,
int width,
int height) |
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy) |
Graphics |
create() |
void |
dispose() |
void |
draw(Shape s) |
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Circles only for now, must be width == height and arcAngle == 360
Otherwise throws UnsupportedOperationException
TODO
|
void |
drawGlyphVector(GlyphVector g,
float x,
float y) |
void |
drawImage(BufferedImage img,
BufferedImageOp op,
int x,
int y) |
boolean |
drawImage(Image img,
AffineTransform xform,
ImageObserver obs) |
boolean |
drawImage(Image img,
int x,
int y,
Color bgcolor,
ImageObserver obs) |
boolean |
drawImage(Image img,
int x,
int y,
ImageObserver obs) |
boolean |
drawImage(Image img,
int x,
int y,
int width,
int height,
Color bgcolor,
ImageObserver obs) |
boolean |
drawImage(Image img,
int x,
int y,
int width,
int height,
ImageObserver obs) |
boolean |
drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
Color bgcolor,
ImageObserver obs) |
boolean |
drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
ImageObserver obs) |
void |
drawLine(int x1,
int y1,
int x2,
int y2) |
void |
drawOval(int x,
int y,
int width,
int height) |
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints) |
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints) |
void |
drawRenderableImage(RenderableImage img,
AffineTransform xform) |
void |
drawRenderedImage(RenderedImage img,
AffineTransform xform) |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight) |
void |
drawString(AttributedCharacterIterator iterator,
float x,
float y) |
void |
drawString(AttributedCharacterIterator iterator,
int x,
int y) |
void |
drawString(String str,
float x,
float y) |
void |
drawString(String str,
int x,
int y) |
void |
fill(Shape s) |
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Circles only for now, must be width == height and arcAngle == 360
Otherwise throws UnsupportedOperationException
TODO
|
void |
fillOval(int x,
int y,
int width,
int height) |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints) |
void |
fillPolyline(int[] xPoints,
int[] yPoints,
int nPoints) |
void |
fillRect(int x,
int y,
int width,
int height) |
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight) |
Color |
getBackground() |
Shape |
getClip() |
Rectangle |
getClipBounds() |
Color |
getColor() |
Composite |
getComposite() |
GraphicsConfiguration |
getDeviceConfiguration() |
Font |
getFont() |
FontMetrics |
getFontMetrics(Font f) |
FontRenderContext |
getFontRenderContext() |
SimpleSVGMaker |
getMaker()
Graphics2D API bypass, advanced use only
|
Paint |
getPaint() |
Object |
getRenderingHint(RenderingHints.Key hintKey) |
RenderingHints |
getRenderingHints() |
Stroke |
getStroke() |
String |
getSVG() |
AffineTransform |
getTransform() |
boolean |
hit(Rectangle rect,
Shape s,
boolean onStroke) |
void |
rotate(double theta) |
void |
rotate(double theta,
double x,
double y) |
void |
scale(double sx,
double sy) |
void |
setBackground(Color color) |
void |
setClip(int x,
int y,
int width,
int height) |
void |
setClip(Shape clip) |
void |
setColor(Color color) |
void |
setComposite(Composite comp) |
void |
setFont(Font font) |
void |
setPaint(Paint paint) |
void |
setPaintMode() |
void |
setRenderingHint(RenderingHints.Key hintKey,
Object hintValue) |
void |
setRenderingHints(Map<?,?> hints) |
void |
setStroke(Stroke stroke) |
void |
setTransform(AffineTransform tx) |
void |
setXORMode(Color color) |
void |
shear(double shx,
double shy) |
void |
transform(AffineTransform tx) |
void |
translate(double tx,
double ty) |
void |
translate(int x,
int y) |
draw3DRect, fill3DRect
create, drawBytes, drawChars, drawPolygon, drawRect, fillPolygon, finalize, getClipBounds, getClipRect, getFontMetrics, hitClip, toString
public static final RenderingHints.Key KEY_SVG_ID
public static final RenderingHints.Key KEY_SVG_CLASS
public static final RenderingHints.Key KEY_SVG_TITLE
public static final RenderingHints.Key KEY_ELEMENT_ID
public static final RenderingHints.Key KEY_ELEMENT_CLASS
public static final RenderingHints.Key KEY_ELEMENT_ATTMAP
public static final RenderingHints.Key KEY_ELEMENT_TITLE
public static final RenderingHints.Key KEY_ELEMENT_INNERSVG
public String getSVG()
public SimpleSVGMaker getMaker()
public void append(String s)
public void drawLine(int x1, int y1, int x2, int y2)
public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
drawPolyline
in class Graphics
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
fillPolygon
in class Graphics
public void fillRect(int x, int y, int width, int height)
public void drawString(String str, int x, int y)
drawString
in class Graphics2D
public void drawString(String str, float x, float y)
drawString
in class Graphics2D
public FontRenderContext getFontRenderContext()
getFontRenderContext
in class Graphics2D
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
public void clearRect(int x, int y, int width, int height)
public void draw(Shape s)
draw
in class Graphics2D
public void fill(Shape s)
fill
in class Graphics2D
public void setClip(int x, int y, int width, int height)
public void translate(int x, int y)
translate
in class Graphics2D
public void translate(double tx, double ty)
translate
in class Graphics2D
public void rotate(double theta)
rotate
in class Graphics2D
public void rotate(double theta, double x, double y)
rotate
in class Graphics2D
public void scale(double sx, double sy)
scale
in class Graphics2D
public void shear(double shx, double shy)
shear
in class Graphics2D
public void setTransform(AffineTransform tx)
setTransform
in class Graphics2D
public AffineTransform getTransform()
getTransform
in class Graphics2D
public void setPaint(Paint paint)
setPaint
in class Graphics2D
public void setStroke(Stroke stroke)
setStroke
in class Graphics2D
public void setBackground(Color color)
setBackground
in class Graphics2D
public Color getBackground()
getBackground
in class Graphics2D
public Rectangle getClipBounds()
getClipBounds
in class Graphics
public Paint getPaint()
getPaint
in class Graphics2D
public Stroke getStroke()
getStroke
in class Graphics2D
public void addRenderingHints(Map<?,?> hints)
addRenderingHints
in class Graphics2D
public Object getRenderingHint(RenderingHints.Key hintKey)
getRenderingHint
in class Graphics2D
public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
setRenderingHint
in class Graphics2D
public void setRenderingHints(Map<?,?> hints)
setRenderingHints
in class Graphics2D
public void clipRect(int x, int y, int width, int height)
public void clip(Shape s)
clip
in class Graphics2D
public void copyArea(int x, int y, int width, int height, int dx, int dy)
public void drawGlyphVector(GlyphVector g, float x, float y)
drawGlyphVector
in class Graphics2D
public void drawImage(BufferedImage img, BufferedImageOp op, int x, int y)
drawImage
in class Graphics2D
public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs)
drawImage
in class Graphics2D
public boolean drawImage(Image img, int x, int y, ImageObserver obs)
public boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver obs)
public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver obs)
public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver obs)
public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver obs)
public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver obs)
public void drawOval(int x, int y, int width, int height)
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
drawPolygon
in class Graphics
public void drawRenderableImage(RenderableImage img, AffineTransform xform)
drawRenderableImage
in class Graphics2D
public void drawRenderedImage(RenderedImage img, AffineTransform xform)
drawRenderedImage
in class Graphics2D
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
drawRoundRect
in class Graphics
public void drawString(AttributedCharacterIterator iterator, float x, float y)
drawString
in class Graphics2D
public void drawString(AttributedCharacterIterator iterator, int x, int y)
drawString
in class Graphics2D
public void fillOval(int x, int y, int width, int height)
public void fillPolyline(int[] xPoints, int[] yPoints, int nPoints)
public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
fillRoundRect
in class Graphics
public Composite getComposite()
getComposite
in class Graphics2D
public GraphicsConfiguration getDeviceConfiguration()
getDeviceConfiguration
in class Graphics2D
public FontMetrics getFontMetrics(Font f)
getFontMetrics
in class Graphics
public RenderingHints getRenderingHints()
getRenderingHints
in class Graphics2D
public boolean hit(Rectangle rect, Shape s, boolean onStroke)
hit
in class Graphics2D
public void setComposite(Composite comp)
setComposite
in class Graphics2D
public void setPaintMode()
setPaintMode
in class Graphics
public void setXORMode(Color color)
setXORMode
in class Graphics
public void transform(AffineTransform tx)
transform
in class Graphics2D