|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.image.ImageWriter
public class ImageWriter extends java.lang.Object
This utility class writes chart view as encoded image to given data streams.
| Modifier and Type | Field and Description |
|---|---|
static int |
SCREEN_DPI
Number of pixels per inch on monitor screen. |
| Constructor and Description |
|---|
ImageWriter()
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(AbstractGraphics g,
View chart,
int width,
int height)
Instead of writing encoded image data to stream, this lower level method allows to draw chart view into any graphics context for further custom manipulation. |
void |
writePNG(java.io.OutputStream stream,
View chart,
int width,
int height)
Outputs chart image encoded in PNG format with dpi equal to SCREEN_DPI. |
void |
writePNG(java.io.OutputStream stream,
View chart,
int width,
int height,
int dpi)
Outputs chart image encoded in PNG format using given dpi. |
void |
writeSVG(java.io.OutputStream stream,
View chart,
int width,
int height)
Outputs chart image encoded in SVG format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SCREEN_DPI
| Constructor Detail |
|---|
public ImageWriter()
| Method Detail |
|---|
public void writePNG(java.io.OutputStream stream,
View chart,
int width,
int height)
stream - stream to write into. Stream is closed on return.chart - chart viewwidth - width of chartheight - height of chart
public void writePNG(java.io.OutputStream stream,
View chart,
int width,
int height,
int dpi)
width x height sized view, but image will be bigger in pixels.
dpi/SCREEN_DPI ratio will be used for scaling.
stream - stream to write into. Stream is closed on return.chart - chart viewwidth - width of chartheight - height of chartdpi - dots per inch for exported image
public void writeSVG(java.io.OutputStream stream,
View chart,
int width,
int height)
stream - stream to write into. Stream is closed on return.chart - chart viewwidth - width of chartheight - height of chart
public void draw(AbstractGraphics g,
View chart,
int width,
int height)
g - graphics contextchart - chart viewwidth - width of chartheight - height of chart
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||