Topic: Rotated text problems

I've just started using Diagram Designer, and it is working really well apart from one thing.

There are some problems with Rotated Text.

E.g
Create a rectangle width = 10mm, height = 40mm, rotate 90 degrees, and add the text 'Some text'

The text is unnecessarily split on to two lines.

Increasing the width of the text box to 20mm makes the text appear on a single line. So the width of the text box is being used to determine the line length for the text, whatever rotation is used.

Continuing from the previous example, set the vertical alignment to 'Top', and the text is now drawn outside the rectangle to the left side of the box. Similarly, the height of the box is being used to determine position of the text instead of the width.

Fixing this for arbitrary angles may be a bit tricky, but a workaround for multiples of 90 degrees would probably cover a high percentage of uses of text rotation for the minimum of effort. Alternatively, it may be better to have rotation apply to the whole object, and not just the text.

Here is something if put together in the expression evaluator to calculate the longest rotated line that fits in a rectangle.
:width = 10;
:height = 40;
:theta = pi / 2;
:len1 = abs( height / sin(theta) );
:len2 = abs( width / cos(theta) );
if(len1 < len2, len1, len2)

Chris Ward

Re: Rotated text problems

I think i did mention something like this some time ago when the rotating text was added.
There is also a difference if you rotate the object in the context menu or using the rotation angle in the properties.

Spam deleted 2013: 54,  2014: 11,  2015: 3,  2016: 107

3

Re: Rotated text problems

Thanks for letting me know - I must admit that I completely forgot about that. I will work on a fix.

Michael Vinther

> software developer <

4

Re: Rotated text problems

This should now be fixed in the latest beta version for multiples of 90° rotations.

http://meesoft.logicnet.dk/support/view … hp?id=3266

Michael Vinther

> software developer <

Re: Rotated text problems

Thanks for the fix. I've just installed the beta, and tried it out.

It works when the V & H text allignment are set to centre. However, it still has problems with the other alignments:

chrisward wrote:

Continuing from the previous example, set the vertical alignment to 'Top', and the text is now drawn outside the rectangle to the left side of the box. Similarly, the height of the box is being used to determine position of the text instead of the width.

6

Re: Rotated text problems

The alignments should now be fixed in the latest beta

Michael Vinther

> software developer <

Re: Rotated text problems

Thanks, that works perfectly now.

While testing it, I did find a relatively minon unrelated bug which I'll put in a separate thread.