|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.graphics.chart.AbstractChart
com.davisor.graphics.chart.ImageChart
com.davisor.graphics.chart.SVGChart
SVGChart represents a chart generated by a chart factory as a SVG XML document. The result contains a XML document that is the chart itself, a reference to the graphics' context that generated the document, a reference to the factory that generated the chart and a copy of the factory settings that the chart was generated with. The data that the chart was generated with is not included.
BufferedChart,
ChartAttributes,
ChartFactory,
Serialized Form| Field Summary | |
static java.lang.String |
SVG_FONT_PARAMETER
Image parameter 'svgFont' for controlling SVG fonts. |
static java.lang.String |
TEXT_ANTIALIAS_OFF
Text antialising parameter value 'on' |
static java.lang.String |
TEXT_ANTIALIAS_ON
Text antialising parameter value 'on' |
static java.lang.String |
TEXT_ANTIALIAS_PARAMETER
Image parameter 'text-antialias' for controlling text antialiasing. |
static java.lang.String |
TEXT_RENDERING_PARAMETER
Image parameter 'text' for controlling text rendering strategy. |
static java.lang.String |
TEXT_RENDERING_SHAPE
Text rendering parameter value 'shape' for SVG text shape rendering. |
static java.lang.String |
TEXT_RENDERING_SVG
Text rendering parameter value 'svg' for using SVG text. |
| Fields inherited from class com.davisor.graphics.chart.ImageChart |
M_backArea, M_graphics, M_image, M_imageParams, M_plotArea |
| Fields inherited from class com.davisor.graphics.chart.AbstractChart |
M_annotatedShapes, M_contentType, M_height, M_resolution, M_width |
| Constructor Summary | |
|
SVGChart(ChartAttributes attr)
Creates a SVGChart out of the given factory and attributes. |
protected |
SVGChart(java.lang.Number width,
java.lang.Number height,
java.lang.Number resolution,
java.util.List annotatedShapes)
Creates a new SVG chart. |
protected |
SVGChart(java.lang.Number width,
java.lang.Number height,
java.lang.Number resolution,
java.util.List annotatedShapes,
java.lang.String imageParams)
Creates a new SVG chart. |
|
SVGChart(SVGChart svgc)
Shallow copy constructor. |
| Method Summary | |
java.awt.Image |
getImage()
Transcodes the chart into an image. |
void |
putImage(java.io.OutputStream stream,
java.lang.String mime)
Writes the chart image into a stream. |
| Methods inherited from class com.davisor.graphics.chart.ImageChart |
getAnnotatedShapes, getBackArea, getGraphics, getImageParams, getPlotArea, putContent, putImage, putImage, putImage, setAntialiasDefaults, setAntialiasMode, setAntialiasMode, writeReplace |
| Methods inherited from class com.davisor.graphics.chart.AbstractChart |
addAnnotatedShape, getContentType, getHeight, getHeightInMillimeters, getResolution, getSizeInMillimeters, getWidth, getWidthInMillimeters, putChart, putChart, setContentType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String TEXT_ANTIALIAS_PARAMETER
public static final java.lang.String TEXT_ANTIALIAS_ON
public static final java.lang.String TEXT_ANTIALIAS_OFF
public static final java.lang.String TEXT_RENDERING_PARAMETER
public static final java.lang.String TEXT_RENDERING_SVG
public static final java.lang.String TEXT_RENDERING_SHAPE
public static final java.lang.String SVG_FONT_PARAMETER
| Constructor Detail |
protected SVGChart(java.lang.Number width,
java.lang.Number height,
java.lang.Number resolution,
java.util.List annotatedShapes)
width - chart width, in millimeters (may be null)height - chart height, in millimeters (may be null)resolution - resolution, in pixels-per-millimeters (may be null)annotatedShapes - list of annotated shapes (may be null)
protected SVGChart(java.lang.Number width,
java.lang.Number height,
java.lang.Number resolution,
java.util.List annotatedShapes,
java.lang.String imageParams)
width - chart width, in millimeters (may be null)height - chart height, in millimeters (may be null)resolution - resolution, in pixels-per-millimeters (may be null)annotatedShapes - list of annotated shapes (may be null)imageParams - image encoding parameters (may be null)public SVGChart(SVGChart svgc)
public SVGChart(ChartAttributes attr)
After the creation, the graphics will first be filled with the chart background color. If the chart render attributes also define a stroke, a borderline of the given color is drawn around the chart. If the color is not set, black color is used as default.
After the graphics context has been created, a rectangle object is created to record the inner bounds of the drawable area of the image. If a borderline was drawn around the image, the border area is reduced from the bounds.
If a borderline was drawn around the image, an initial translation is added to the context, so that the context origo coincides with the left upper corner of the drawable area inside the border line. The context rendering hints are configured as described by the chart attributes.
attr - chart attributes that tell the chart image's size and type,
among other thingsImageChart.getBackArea(),
ImageChart.getGraphics(),
ImageChart.getPlotArea(),
ImageChart.setAntialiasMode(ChartAttributes)| Method Detail |
public java.awt.Image getImage()
getImage in class ImageChartImageChart.getGraphics()
public void putImage(java.io.OutputStream stream,
java.lang.String mime)
throws java.io.IOException
putImage in class ImageChartstream - output streammime - ignored output MIME type
java.io.IOExceptionImageChart.putImage(OutputStream)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||