Changed step label font because with Arial text was not centered correctly

This commit is contained in:
Jaex 2016-05-25 00:11:24 +03:00
parent 5a87688005
commit b2bc0a634d
2 changed files with 2 additions and 2 deletions

View file

@ -49,7 +49,7 @@ public class AnnotationOptions
// Step drawing // Step drawing
public Color StepBorderColor { get; set; } = Color.White; public Color StepBorderColor { get; set; } = Color.White;
public int StepBorderSize { get; set; } = 0; public int StepBorderSize { get; set; } = 2;
public Color StepFillColor { get; set; } = Color.Red; public Color StepFillColor { get; set; } = Color.Red;
// Blur effect // Blur effect

View file

@ -102,7 +102,7 @@ public override void OnDraw(Graphics g)
int fontSize = Math.Min(Rectangle.Width, Rectangle.Height) - offset; int fontSize = Math.Min(Rectangle.Width, Rectangle.Height) - offset;
using (Font font = new Font("Arial", fontSize, GraphicsUnit.Pixel)) using (Font font = new Font(FontFamily.GenericSansSerif, fontSize, FontStyle.Bold, GraphicsUnit.Pixel))
using (StringFormat sf = new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }) using (StringFormat sf = new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center })
{ {
g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;