1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
if (m_nTopLeftRadius > 0) {
// draw a quarter of a circle in the upper left corner
nDiameter = m_nTopLeftRadius * 2;
rect.X = nX;
rect.Y = nY;
rect.Width = rect.Height = m_nTopLeftRadius;
fillBrush = new LinearGradientBrush(rect, m_colorLeft, m_colorCenter, 45.0f);
graph.FillPie(fillBrush, nX, nY, nDiameter, nDiameter, 180, 90);
}
// draw left border gradient
rect.X = nX;
rect.Y = nY + m_nTopLeftRadius;
rect.Width = m_nFrameWidth;
rect.Height = nH - m_nTopLeftRadius - m_nBottomLeftRadius;
colors[0] = m_colorLeft;
colors[1] = m_colorCenter;
//Colors actually in brush don't matter because we are using the LinearColors array.
fillBrush = new LinearGradientBrush(rect, m_colorLeft, m_colorCenter, 0.0f);
fillBrush.LinearColors = colors;
graph.FillRectangle(fillBrush, rect); |
Partager