Changeset 10836
- Timestamp:
- 05/11/14 14:34:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/Primitives/RectangularPrimitiveBase.cs
r10831 r10836 146 146 147 147 var stringSize = graphics.MeasureString(Text, Font); 148 float fontSize = (int)(Math.Round(Font.Size * s.Width / stringSize.Width));148 var fontSize = (float)(Math.Round(Font.Size * Math.Min(s.Width / stringSize.Width, s.Height / stringSize.Height))); 149 149 if (fontSize > MaximumFontSize) { fontSize = MaximumFontSize; } 150 150 Font = new Font(Font.FontFamily, fontSize, GraphicsUnit.Pixel);
Note: See TracChangeset
for help on using the changeset viewer.