public void DrawAxes(System.Windows.Forms.TabPage tab,System.Windows.Forms.Panel panel, int Yquantity, int Xquantity, string[,] measuredata)
{
int width = panel.Width;
int height = panel.Height;
int locationx = panel.Location.X;
int locationy = panel.Location.Y;
m_BaseRGBbmp = new Bitmap(tab.Width, tab.Height);
Graphics grp = Graphics.FromImage(m_BaseRGBbmp);
for (int i = 1; i < Yquantity; i++)
{
grp.DrawString(measuredata[i, 0], new Font("Verdana", 10), Brushes.Black, new RectangleF(locationx -30, locationy - 8 + 1.0f * (i - 1) * height/(Yquantity-2), 400, 25));
}
for (int i = 1; i < Xquantity + 1; i++)
{
if ((i-1) % 10 == 0)
{
grp.DrawString(measuredata[0, i], new Font("Verdana", 9), Brushes.Black, new RectangleF(locationx - 10 + 1.0f * (i - 1) * width / (Xquantity - 2), locationy + height+10, 400, 25));
}
}
tab.BackgroundImage = (Image)m_BaseRGBbmp;
}
'프로그래밍 > C#' 카테고리의 다른 글
C# Datagridview Data를 Directx3D로..표현해보았다.. (0) | 2013.04.12 |
---|---|
C# Color scale Wavelength to RGB (0) | 2013.03.22 |
C# Grid 그리기?...라기보단 차트모양으로 선그리기..^^; (0) | 2013.03.22 |
lock in amplifier 원리 (0) | 2012.07.20 |
C# C++ 마샬링? 랩핑?.. (0) | 2012.06.20 |