Skip to content

Commit

Permalink
We don't actually use FreeHEP to SVG output anymore - we have our own…
Browse files Browse the repository at this point in the history
… SVG draw visitor since it's such a simple format.
  • Loading branch information
johnmay authored and egonw committed Jan 3, 2022
1 parent 3182c26 commit ff49a24
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
5 changes: 0 additions & 5 deletions app/depict/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@
<artifactId>cdk-silent</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.freehep</groupId>
<artifactId>freehep-graphicsio-svg</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.freehep</groupId>
<artifactId>freehep-graphicsio-pdf</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
package org.openscience.cdk.depict;

import org.freehep.graphicsio.pdf.PDFGraphics2D;
import org.freehep.graphicsio.svg.SVGGraphics2D;
import org.freehep.graphicsio.ps.PSGraphics2D;

import java.awt.Dimension;
Expand Down Expand Up @@ -66,11 +65,6 @@ public FreeHepWrapper(String fmt, double w, double h) {

private static Graphics2D createGraphics2d(String fmt, OutputStream out, Dimension dim) throws IOException {
switch (fmt) {
case Depiction.SVG_FMT:
SVGGraphics2D svg = new SVGGraphics2D(out, dim);
svg.setCreator("Chemistry Development Kit (http://www.github.com/cdk/)");
svg.writeHeader();
return svg;
case Depiction.PDF_FMT:
PDFGraphics2D pdf = new PDFGraphics2D(out, dim);
pdf.setCreator("Chemistry Development Kit (http://www.github.com/cdk/)");
Expand Down Expand Up @@ -107,10 +101,6 @@ private static Graphics2D createGraphics2d(String fmt, OutputStream out, Dimensi
public void dispose() {
try {
switch (fmt) {
case Depiction.SVG_FMT:
((SVGGraphics2D) g2).writeTrailer();
((SVGGraphics2D) g2).closeStream();
break;
case Depiction.PDF_FMT:
((PDFGraphics2D) g2).writeTrailer();
((PDFGraphics2D) g2).closeStream();
Expand Down

0 comments on commit ff49a24

Please sign in to comment.