org.freedesktop.cairo
Class SvgSurface
Object
org.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.freedesktop.cairo.Surface
org.freedesktop.cairo.SvgSurface
public class SvgSurface
- extends Surface
A Surface that you can use to write to a SVG file. You should use it as in the following example:
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.
- Since:
- 4.0.10
- Author:
- Vreixo Formoso
|
Constructor Summary |
SvgSurface(String filename,
double width,
double height)
Create a new SvgSurface. |
| Methods inherited from class org.freedesktop.bindings.Pointer |
toString |
| Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SvgSurface
public SvgSurface(String filename,
double width,
double height)
throws IOException
- Create a new SvgSurface.
- Parameters:
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)
- Throws:
IOException - If you do not have write permissions on the given file.