java.lang.Object
org.jhotdraw8.draw.io.AbstractExportOutputFormat
org.jhotdraw8.svg.io.SvgExportOutputFormat
- All Implemented Interfaces:
ClipboardOutputFormat,ExportOutputFormat,OutputFormat
public class SvgExportOutputFormat
extends AbstractExportOutputFormat
implements ClipboardOutputFormat, OutputFormat
Exports a JavaFX scene graph to SVG.
- Author:
- Werner Randelshofer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.jhotdraw8.fxcollection.typesafekey.NonNullObjectKey<Boolean> static final javafx.scene.input.DataFormatstatic final StringFields inherited from interface org.jhotdraw8.draw.io.ExportOutputFormat
EXPORT_DRAWING_DPI_KEY, EXPORT_DRAWING_KEY, EXPORT_PAGES_DPI_KEY, EXPORT_PAGES_KEY, EXPORT_SLICES_DPI_KEY, EXPORT_SLICES_KEY, EXPORT_SLICES_RESOLUTION_2X_KEY, EXPORT_SLICES_RESOLUTION_3X_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected booleanvoidsetExporterFactory(BiFunction<Object, Object, AbstractFXSvgWriter> exporterFactory) toDocument(@Nullable URI documentHome, Drawing external, Collection<Figure> selection) voidwrite(OutputStream out, @Nullable URI documentHome, Drawing drawing, org.jhotdraw8.fxbase.concurrent.WorkState<Void> workState) protected voidwrite(@Nullable URI documentHome, OutputStream out, Drawing drawing, Collection<Figure> selection) voidvoidwrite(Map<javafx.scene.input.DataFormat, Object> clipboard, Drawing drawing, Collection<Figure> selection) protected voidwritePage(Path file, Page page, javafx.scene.Node node, int pageCount, int pageNumber, int internalPageNumber) protected booleanwriteSlice(Path file, Slice slice, javafx.scene.Node node, double dpi) Methods inherited from class org.jhotdraw8.draw.io.AbstractExportOutputFormat
getOptions, isExportDrawing, isExportPages, isExportSlices, isExportSlices2x, isExportSlices3x, setOptions, writePages, writePages, writeSlicesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.draw.input.ClipboardOutputFormat
writeMethods inherited from interface org.jhotdraw8.draw.io.OutputFormat
getOptions, setOptions, write
-
Field Details
-
RELATIVIZE_PATHS
public static final org.jhotdraw8.fxcollection.typesafekey.NonNullObjectKey<Boolean> RELATIVIZE_PATHS -
SVG_FORMAT
public static final javafx.scene.input.DataFormat SVG_FORMAT -
SVG_MIME_TYPE
- See Also:
-
-
Constructor Details
-
SvgExportOutputFormat
public SvgExportOutputFormat()
-
-
Method Details
-
setExporterFactory
-
getExtension
- Specified by:
getExtensionin classAbstractExportOutputFormat
-
isResolutionIndependent
protected boolean isResolutionIndependent()- Specified by:
isResolutionIndependentin classAbstractExportOutputFormat
-
toDocument
public Document toDocument(@Nullable URI documentHome, Drawing external, Collection<Figure> selection) throws IOException - Throws:
IOException
-
write
public void write(Map<javafx.scene.input.DataFormat, Object> clipboard, Drawing drawing, Collection<Figure> selection) throws IOException- Specified by:
writein interfaceClipboardOutputFormat- Throws:
IOException
-
write
public void write(Path file, Drawing drawing, org.jhotdraw8.fxbase.concurrent.WorkState<Void> workState) throws IOException - Specified by:
writein interfaceOutputFormat- Throws:
IOException
-
write
public void write(OutputStream out, @Nullable URI documentHome, Drawing drawing, org.jhotdraw8.fxbase.concurrent.WorkState<Void> workState) throws IOException - Specified by:
writein interfaceOutputFormat- Throws:
IOException
-
write
protected void write(@Nullable URI documentHome, OutputStream out, Drawing drawing, Collection<Figure> selection) throws IOException - Throws:
IOException
-
writePage
protected void writePage(Path file, Page page, javafx.scene.Node node, int pageCount, int pageNumber, int internalPageNumber) throws IOException - Specified by:
writePagein classAbstractExportOutputFormat- Throws:
IOException
-
writeSlice
protected boolean writeSlice(Path file, Slice slice, javafx.scene.Node node, double dpi) throws IOException - Specified by:
writeSlicein classAbstractExportOutputFormat- Throws:
IOException
-