Skip to content
New issue

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

Graphics2d builder and testdriver #74

Merged

Conversation

rototor
Copy link
Contributor

@rototor rototor commented Feb 26, 2017

I've started to update the Graphics2D support. To do so I've created a Java2DRendererBuilder and called it in the testdriver to write a PNG output beside the PDF output. I also tried to reproduce #63 with this, but I could not.

The PNG currently shows some missing features and bugs:

  • CMYK colors are not supported at the moment. We should just use some simple hardcoded CMYK->RGB conversion for that as a start. I think using some kind of ICC-based color conversion is overkill here.
  • For whatever reason the text in the svg-sample is rendered broken. I think for Java2D the correct fix is to just use TextLayout and let TextLayout do all the rendering. Then Java2D will have as much Bidi support as Java itself has.
  • Also the (partly) unused support for drawing selections is obsolete. If someone wants to display HTML in his application he will likely rather use the JavaFX-WebKit component from the JDK. For me the Java2D support is mostly the ability to render HTML to an image, so selections aren't really needed. I think the selection support should just be deleted.
  • The current place where I've put the Java2DRendererBuilder is not the best one. Also the innerclasses should maybe be outerclasses in some other packages. Feel free to suggest a better place.

When I find time again I would like to work on this things. Do you have any objections?

@danfickle
Copy link
Owner

Hi @rototor

Thank you again, this looks really good. I'm going to merge now and then I'll try to put the Java2D output related code in its own sub-module. We can then continue the discussion at #73

Regards,
Daniel.

@danfickle danfickle merged commit edbbb11 into danfickle:open-dev-v1 Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants