7

I am using ObjectAid UML Explorer to generate a UML Class Diagram from my code.

I need to include the output PNG in a LaTeX document and what I get is way too low resolution for inclusion.

How can I get higher resolution output from the Eclipse plug-in?

I can see the internal format of a .ucls file is just XML:

<class-diagram version="1.0.10"...

Is there a way to get something more dense than 72dpi or something in a scalable format, say EPS or similar? The target document is > 300dpi so 72dpi does not even come close, unfortunately. Whatever rasterises the XML definition has to accept a trap and a pluggable module?

I need something that plugs into the auto-save mechanism of ObjectAid...

Adrian Lange
  • 423
  • 11
  • 15
Robottinosino
  • 10,384
  • 17
  • 59
  • 97

4 Answers4

5

I've found a dirty but easy solution to the problem.

By printing the diagram to a PDF, e.g. with programs like PDFCreator, you gain a vector graphic in the PDF. With a graphics editing program like Adobe Photoshop or Gimp you can raster the PDF to a high quality PNG.

It worked fine for me.

With ObjectAid's Diagram Add-On you can make some customizations regarding the printing scale. There's also the possibility to save the diagrams as SVG image, which you can convert to a high quality pixel image, too.

Adrian Lange
  • 423
  • 11
  • 15
0

Did you try to use a cropping/design tool such as snagit which would crop a copy of your computer screen and export it in high definition such as an image or directly paste and copy inside a word document ?

I have the same problem than you for providing documentation of my java code. I use EclipseUML Omondo but the image export is pretty poor too. I now prefer to use specific cropping tool for my image export which is a lot better.

I mean that you create the view you need on your computer screen then crop it and paste it in your documentation. I like to use the snagit's paste and copy feature with Microsoft word.

My favorite tool for cropping my UML diagrams is snagit.

UML GURU
  • 1,452
  • 1
  • 9
  • 7
  • How can a screenshot grabbing tool scale a raster image without losing quality? Does it do an *"autotrace"* and recreate what it sees as vector graphics? – Robottinosino Sep 12 '12 at 10:10
0

Not possible until ObjectAid implements the feature...

Robottinosino
  • 10,384
  • 17
  • 59
  • 97
0

Although it's not glamorous, what I did was go into Window | Preferences | General | Appearance | Colors and Fonts inside Eclipse and set all the text fields to double their size.

This created a larger diagram and the export was therefore in a higher res.

satyrFrost
  • 393
  • 8
  • 17
  • To then resize it down without "losing too much"? Sounds interesting... can you post some sample output? – Robottinosino Oct 28 '12 at 00:37
  • Thanks for the image! :) Still low res but your idea is a step in the right direction! – Robottinosino Oct 28 '12 at 17:43
  • No problem. I'm really not up with the play in terms of image quality, res, compression, etc. It was good enough for my Word report, but obviously not for some circumstances. Hope you find a solution. – satyrFrost Oct 28 '12 at 20:48