- Docs
- Workflow
- How to set the output format
How to set the output format
Use the default output format
There is allways an output format configured.
OpenMap4u om4u = new OpenMap4u();
...
SetAreaOfInterestOrDrawOrWriteable myCanvas = om4u.getCanvas(4, 1);
...
myCanvas.draw(
om4u.get(Line.class).line(.25, .125, 3.75, 0.75)
).write("myLine.png");
Which results in the following output.
Set a custom output format
OpenMap4u om4u = new OpenMap4u();
...
SetAreaOfInterestOrDrawOrWriteable myCanvas = om4u.getCanvas(4, 1).outputFormat(Svg.class);
...
myCanvas.draw(
om4u.get(Line.class).line(.25, .125, 3.75, 0.75)
).write("myLine.svg");
Which results in the following output.