last character of label not shown

Topics: SharpMap v0.9 / v1.x, WinForms Controls
Apr 21, 2015 at 4:23 PM
Hello,

the last character of labels were cut off in v1.1. not always but in case that the text of the label was longer than let's say 10 characters well.

i found the cause of this bug in
SharpMap.Rendering.VectorRenderer.cs
        public static SizeF SizeOfString74(Graphics g, string text, Font font)
        {
            var s = g.MeasureString(text, font);
            return new SizeF(s.Width * 0.74f+1f, s.Height * 0.74f); 
        }
i replaced that by
        public static SizeF SizeOfString74(Graphics g, string text, Font font)
        {
            return g.MeasureString(text, font);
        }
after that all worked well.

i don't know the reason for shortening width and height by 0.74 but with longer texts it does not work properly.

Greetz
Dec 21, 2015 at 2:02 AM
you have the compiled dll ? You could upload it for me? please
Jan 5 at 9:34 AM
Ola Pablo,

i compiled it in V1.1 with date of 26.02.2015. if you tried the compiled dll's with another version it might not work.

so, if it's usefull 4 u, tell me where to upload.

saludos
Lothar