apt[6] = new Point[] {
new Point(11, 62), new Point(31, 62),
new Point(39, 70), new Point( 3, 70)
};
}
public SizeF MeasureString(string str, Font font)
{
SizeF sizef = new SizeF(0, grfx.DpiX * font.SizeInPoints / 72);
for (int i = 0; i < str.Length; i++)
{
if (Char.IsDigit(str[i]))
{
sizef.Width += 42 * grfx.DpiX * font.SizeInPoints / 72 / 72;
}
else if (str[i] == '-')
{
sizef.Width += 42 * grfx.DpiX * font.SizeInPoints / 72 / 72;
}
else if (str[i] == ':')
{
sizef.Width += 20 * grfx.DpiX * font.SizeInPoints / 72 / 72;
}
else if (str[i] == ' ')
{
sizef.Width += 36 * grfx.DpiX * font.SizeInPoints / 72 / 72;
}
}
return sizef;
}
public void DrawString(string str, Font font, Brush brush, float x, float y)
{
this._brush = brush;
this._shadowBrush = new SolidBrush(Color.FromArgb(40, ((SolidBrush)this._brush).Color));
for (int i = 0; i < str.Length; i++)
{
if (Char.IsDigit(str[i]))
{
x = Number(str[i] - '0', font, brush, x, y);
}
else if (str[i] == '-')
{
x = MinusSign(font, brush, x, y);
}
else if (str[i] == ':')
{
x = Colon(font, brush, x, y);
}
else if (str[i] == ' ')
{
x = DrawSpace(font, brush, x, y);
}
}
}
private float Number(int num, Font font, Brush brush, float x, float y)
{
for (int i = 0; i < apt.Length; i++)
{
if(_isDrawShadow)
{
Fill(apt[i], font, _shadowBrush, x, y);
}
if (bySegment[num, i] == 1)
&nb
| 对此文章发表了评论 |

