public class SvgSurface extends Surface
surface = new SvgSurface(filename, 100, 100); cr = new Context(surface); // do drawing // and write to the file surface.finish();It is important to call
finish()at the end, to ensure contents are actually written to the file.
|Constructor and Description|
Create a new SvgSurface.
copyPage, createSimilar, finish, flush, setMimeData, setMimeData, showPage, writeToPNG
public SvgSurface(String filename, double width, double height) throws IOException
filename- The file to write to.
width- width of the surface, in points (1 point == 1/72.0 inch)
height- height of the surface, in points (1 point == 1/72.0 inch)
IOException- If you do not have write permissions on the given file.