umlet / umlet

Free UML Tool for Fast UML Diagrams
http://www.umlet.com
GNU General Public License v3.0
1.45k stars 302 forks source link

Costume elements is not consistent at element border #543

Open SorenHN opened 5 years ago

SorenHN commented 5 years ago

Costume elements is not consistent in how they draw elements crossing the element border. For example, this element will draw a quarter of a circle in the upper left corner, but will draw a squished half circle in the lower left corner.

customelement=
drawCircle(0, 0, 50)
drawCircle(0, height, 50)

This is inconsistent behaviour and makes it difficult to draw costume elements with half or quarter circles.

afdia commented 5 years ago

I don't see an inconsistency here. The first 2 params specify the position (=center) and the last one specifies the size of the circle Both (0,0) and (0,height) will only draw partially visible circles because 3/4 of it are outside of the visible part of the element.

If I specify (0,height/2) then half the circle will be visible because the y position is in the middle of the element:

customelement=
drawCircle(0, 0, 50)
drawCircle(0, height/2, 50)
drawCircle(0, height, 50)

grafik

SorenHN commented 5 years ago

That's weird? I tried on to recreate this error in UMLetino and I get the correct figure. I then tried to download the newest version of UMLet (version 14.3.0) and I get this image with the same costume element: UmLet

afdia commented 5 years ago

Oh sorry, before writing my answer I've tried to reproduce it in umletino and as you mentioned the issue does not exist there. So it's an Umlet specific bug which should of course be fixed. As far as I remember Umlet contains some code which guarantees that nothing can exceed the width and height, so this could be the issue.

thanks for the report!

just for documentation the element from my previous post looks like this is umlet: grafik