日期:2014-05-17 浏览次数:20914 次
Pen p = new Pen(Color.Black, 0.1f);
for (int i = 0; i < 420; i++ )
{
if ((i % 10) == 0)
{//厘米
m_TopStaffGph.DrawLine(p, (float)((float)(i * 96) / (float)25.4 + TopLeftBank.Width), 0, (float)((float)(i * 96) / (float)25.4 + TopLeftBank.Width), lineH / 2);
m_TopStaffGph.DrawString((i / 10).ToString(), m_TopStaffFone, Brushes.Black, (float)((float)(i * 96) / (float)25.4 + TopLeftBank.Width - 5), lineH / 2);
}
else if ((i % 5) == 0)
{//5毫米
m_TopStaffGph.DrawLine(p, (float)((float)(i * 96) / (float)25.4 + TopLeftBank.Width), 0, (float)((float)(i * 96) / (float)25.4 + TopLeftBank.Width), lineH / 3);
}
else
{//毫米
m_TopStaffGph.DrawLine(p, (float)((float)(i * 96) / (float)25.4 + TopLeftBank.Width), 0, (float)((float)(i * 96) / (float)25.4 + TopLeftBank.Width), lineH / 4);
}
}