achuanle / umlet

Automatically exported from code.google.com/p/umlet
0 stars 0 forks source link

Cropped output from command line conversion #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Thank you for the great tool! 

Looks like I have some issue command line creation of image files. Here are the 
details -

What steps will reproduce the problem?

1. My test.uxf file contains -

<?xml version="1.0" encoding="UTF-8"?><umlet_diagram><element><type>com.umlet.el
ement.base.SequenceDiagram</type><coordinates><x>10</x><y>10</y><w>202</w><h>140
</h></coordinates><panel_attributes>
Controller|GS0|GS1|GS2
1-&gt;&gt;&gt;2:(msg 1)
2.&gt;1:(msg 2)
2-&gt;1:(msg 3)
4-&gt;1:(msg 4)
</panel_attributes><additional_attributes></additional_attributes></element></um
let_diagram>

2. I converted this to .png file using the command line - 

java -jar umlet.jar -action=convert -format=png -filename=test.uxf

This created test.png file

3. I used umlet.sh test.uxf and exported the file as test_working.png

What is the expected output? What do you see instead?

Expected: I expected the same output irrespective of command line option or 
interactive option.
Instead: I see the png output from command line run is cropped and unusable 
while the interactive version is perfect.

What version of the product are you using? On what operating system?

Latest - 12.2

Please provide any additional information below.

Please see the attached working/non-working files (test.png/test_working.png)
I tried with other formats (jpg/pdf) and the issue persists.

Original issue reported on code.google.com by ganesh.h...@gmail.com on 30 Nov 2013 at 4:36

Attachments:

GoogleCodeExporter commented 9 years ago
My system : Linux 12.04 LTS

Original comment by ganesh.h...@gmail.com on 30 Nov 2013 at 4:43

GoogleCodeExporter commented 9 years ago
the issue is twofold:
1. umlet batch mode currently doesn't read the umlet config, therefore it 
doesn't recognize changed default-umlet-fontsize -> fixed in r807

2. the all-in-one diagrams recalculate their real size AFTER painting them. 
this works for standalone because they are constantly repainted, but in 
batchmode there is only one paint call -> as it's not easy to change this 
behaviour, they get a pseudo-paint call which sets their size before exporting 
them -> fixed in r808

I guess these 2 fixed should be sufficient to guarantee that the exported image 
looks as expected.

Until the release of the next version, the issue should not occur if you open 
the diagram in umlet using default-umlet-fontsize of 14 and saving it which 
will correct the height+width of the element (the change-* will not be visible 
so just move the element around a few pixels)

Original comment by AFDiaX on 11 Dec 2013 at 9:50

GoogleCodeExporter commented 9 years ago

Original comment by AFDiaX on 3 May 2014 at 11:11