Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Added EMF and EPS save as options to TIC and XIC graphs #26

Merged
merged 5 commits into from
May 8, 2015

Conversation

dyrlund
Copy link
Member

@dyrlund dyrlund commented May 7, 2015

No description provided.

@dyrlund
Copy link
Member Author

dyrlund commented May 7, 2015

I set the target size of the export to depend on the component size on the screen to follow the implementation of the PNG export. Anyway, since the two new image formats are vector files, then the user can scale the images without loosing quality and I therefore think that we should keep the export simple without user defined width and height parameters.

I will change the implementation to account for the other issues you raised.

@dyrlund
Copy link
Member Author

dyrlund commented May 7, 2015

With regards to the error message box for the user, will the following be enough or are you thinking of a message box with the error?
LOG.log(Level.WARNING, "Unable to save image.", e);

@tomas-pluskal
Copy link
Member

I thought about a message box using MZmineCore.getDesktop().displayErrorMessage(), because this is a purely GUI-based operation.

@dyrlund
Copy link
Member Author

dyrlund commented May 8, 2015

Is there a nicer way to code this part of the code?

       if (file.length() > 3) {
       if (!file.substring(file.length() - 3).toLowerCase().equals("emf")) {
           file = file + ".emf";
           }
       }
       else { file = file + ".emf"; }

@tomas-pluskal
Copy link
Member

how about
if (! file.toLowerCase().endsWith(".emf")) file += ".emf";

@dyrlund
Copy link
Member Author

dyrlund commented May 8, 2015

Yep - exactly what I was looking for. Very nice way to solve it 👍

@dyrlund
Copy link
Member Author

dyrlund commented May 8, 2015

I moved the saving of the images to a new class to run it in a separate thread.

@tomas-pluskal
Copy link
Member

I think the SaveImage class was not included in the commit..

@dyrlund
Copy link
Member Author

dyrlund commented May 8, 2015

Wierd. I have added it now.

@tomas-pluskal
Copy link
Member

Looks good, merging now.

tomas-pluskal added a commit that referenced this pull request May 8, 2015
Added EMF and EPS save as options to TIC and XIC graphs
@tomas-pluskal tomas-pluskal merged commit c5ea409 into mzmine:master May 8, 2015
@dyrlund dyrlund deleted the emf_and_eps branch May 8, 2015 07:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants