Eclipse 插件:ObjectAid UML Explorer 类图:以更高分辨率导出

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12385047/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 18:57:39  来源:igfitidea点击:

Eclipse plug-in: ObjectAid UML Explorer Class Diagram: export in higher resolution

eclipseumlclass-diagramobjectaid

提问by Robottinosino

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

我正在使用 ObjectAid UML Explorer 从我的代码生成 UML 类图。

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

我需要在 LaTeX 文档中包含输出 PNG,但我得到的分辨率太低而无法包含。

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

如何从 Eclipse 插件获得更高分辨率的输出?

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

我可以看到 .ucls 文件的内部格式只是 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?

有没有办法获得比 72dpi 更密集的东西或可扩展格式的东西,比如 EPS 或类似的?不幸的是,目标文档 > 300dpi 所以 72dpi 甚至不接近。XML 定义必须接受陷阱和可插拔模块的任何光栅化?

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

我需要一些可以插入 ObjectAid 自动保存机制的东西...

采纳答案by Robottinosino

Not possible until ObjectAid implements the feature...

在 ObjectAid 实现该功能之前不可能...

回答by Adrian Lange

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.

通过将图表打印为 PDF,例如使用 PDFCreator 之类的程序,您可以在 PDF 中获得矢量图形。使用 Adob​​e Photoshop 或 Gimp 等图形编辑程序,您可以将 PDF 光栅化为高质量的 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.

使用 ObjectAid 的图表附加组件,您可以对打印比例进行一些自定义。还可以将图表保存为 SVG 图像,您也可以将其转换为高质量的像素图像。

回答by UML GURU

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 ?

您是否尝试使用诸如 snagit 之类的裁剪/设计工具来裁剪计算机屏幕的副本并将其导出为高清晰度(例如图像)或直接粘贴并复制到 Word 文档中?

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.

在提供我的 Java 代码文档方面,我遇到了与您相同的问题。我使用 EclipseUML Omondo 但图像导出也很差。我现在更喜欢使用特定的裁剪工具来导出图像,这要好得多。

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.

我的意思是您在计算机屏幕上创建所需的视图,然后将其裁剪并粘贴到文档中。我喜欢在 Microsoft Word 中使用 snagit 的粘贴和复制功能。

My favorite tool for cropping my UML diagrams is snagit.

我最喜欢的裁剪 UML 图的工具是 snagit。

回答by satyrFrost

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

虽然不是很迷人,但我所做的就是进入Window | 偏好 | 一般 | 外观 | Eclipse 中的颜色和字体,并将所有文本字段的大小设置为两倍。

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

这创建了一个更大的图表,因此导出的分辨率更高。