We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EMFGraphics2D g2 = new EMFGraphics2D(new FileOutputStream(new File("/tmp/test.emf")), new Dimension(800, 600)); BasicStroke basicStroke = new BasicStroke(2f); g2.setStroke(basicStroke); g2.setColor(Color.RED); g2.draw(new Line2D.Double(0, 0, 800, 600)); g2.dispose();
The culprit is that the os field of the class is null.
It works when invoking writeHeader() first. Imo there are two options:
The same applies imo for the disposal... if the inital Graphics2D is disposed, writeTrailer and at least flush should be called on the stream.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
EMFGraphics2D g2 = new EMFGraphics2D(new FileOutputStream(new File("/tmp/test.emf")), new Dimension(800, 600));
BasicStroke basicStroke = new BasicStroke(2f);
g2.setStroke(basicStroke);
g2.setColor(Color.RED);
g2.draw(new Line2D.Double(0, 0, 800, 600));
g2.dispose();
The culprit is that the os field of the class is null.
It works when invoking writeHeader() first.
Imo there are two options:
The same applies imo for the disposal... if the inital Graphics2D is disposed, writeTrailer and at least flush should be called on the stream.
The text was updated successfully, but these errors were encountered: