Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Node text is cut off (Read 2818 times)
Adis
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: May 27th, 2019
Node text is cut off
May 28th, 2019 at 8:40am
Print Post  
Hello,
we are currently evaluating a purchase of MF 6.5.3 to automatically layout process plans based on given connection data.

Currently we have problem which is related to node text. In certain zoom level the text is somehow cut off which is visible on attached image.

As far as I have figured out, the TextComponent is not resizing properly. For demonstration I have set it's background to green.
  

Screenshot_20.png ( 21 KB | 153 Downloads )
Screenshot_20.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Node text is cut off
Reply #1 - May 28th, 2019 at 9:10am
Print Post  
Hi,

Maybe the font does not scale proportionally with rest of the graphics when scale is applied. Please post your property values for font family and size, text alignment, diagram's measure unit and zoom level.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Adis
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: May 27th, 2019
Re: Node text is cut off
Reply #2 - May 28th, 2019 at 9:33am
Print Post  
Font is custom (check attachment), 8pt, TextAlignment is Center, VerticalAlignment is Center
Diagram measurment unit is Milimeters, and zoom factor is 110.
« Last Edit: May 29th, 2019 at 7:03am by Adis »  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Node text is cut off
Reply #3 - May 28th, 2019 at 1:12pm
Print Post  
That seems a property of the font itself being drawn very high in the layout rectangle, and mostly at 1.1scale (the i's dot disappearing behind the border) -



Code
Select All
protected override void OnPaint(PaintEventArgs e)
{
    base.OnPaint(e);

    var arial = new Font("Arial", 8, GraphicsUnit.Point);
    var arialSize = e.Graphics.MeasureString("arial", arial);

    var voestalpine = new Font("voestalpine", 8, GraphicsUnit.Point);
    var voestalpineSize = e.Graphics.MeasureString("voestalpine", voestalpine);

    for (int i = 0; i < 7; i++)
    {
        e.Graphics.DrawString("arial", arial, Brushes.Black, 10 + i * 60, 10);
        e.Graphics.DrawRectangle(Pens.Red, 10 + i * 60, 10, arialSize.Width, arialSize.Height);

        e.Graphics.DrawString("voestalpine", voestalpine, Brushes.Black, 10 + i * 60, 40);
        e.Graphics.DrawRectangle(Pens.Red, 10 + i * 60, 40, voestalpineSize.Width, voestalpineSize.Height);

        e.Graphics.ScaleTransform(1.1f, 1.1f);
    }
} 



Or at least that's how the GDI+ API draws the font... You might try compensating for that with some padding space.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Adis
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: May 27th, 2019
Re: Node text is cut off
Reply #4 - May 28th, 2019 at 1:41pm
Print Post  
Thanks Slavcho  Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint