本文整理汇总了C++中Graphics::FillEllipse方法的典型用法代码示例。如果您正苦于以下问题:C++ Graphics::FillEllipse方法的具体用法?C++ Graphics::FillEllipse怎么用?C++ Graphics::FillEllipse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Graphics
的用法示例。
在下文中一共展示了Graphics::FillEllipse方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawHotShape
void CAngleLabel::DrawHotShape(Graphics& graph)
{
SolidBrush sbrush(Color::White);
Pen penDraw(Color::Blue, 3);
PointF ptLT;
ptLT.X = m_ptary[0].X - m_nWidth;
ptLT.Y = m_ptary[0].Y - m_nWidth;
Rect rect((int)ptLT.X, (int)ptLT.Y, m_nWidth * 2, m_nWidth * 2);
graph.DrawEllipse(&penDraw, rect);
graph.FillEllipse(&sbrush, rect);
ptLT.X = m_ptary[1].X - m_nWidth;
ptLT.Y = m_ptary[1].Y - m_nWidth;
rect.X = (int)ptLT.X;
rect.Y = (int)ptLT.Y;
rect.Width = m_nWidth * 2;
rect.Height = m_nWidth * 2;
graph.DrawEllipse(&penDraw, rect);
graph.FillEllipse(&sbrush, rect);
ptLT.X = m_ptary[2].X - m_nWidth;
ptLT.Y = m_ptary[2].Y - m_nWidth;
rect.X = (int)ptLT.X;
rect.Y = (int)ptLT.Y;
rect.Width = m_nWidth * 2;
rect.Height = m_nWidth * 2;
graph.DrawEllipse(&penDraw, rect);
graph.FillEllipse(&sbrush, rect);
}
示例2: Draw
void CCircleView::Draw(CDC* pDC, const std::vector<CElement*>& selection, CElement* highlight)
{
Color theColor = ColorToDraw(selection, highlight);
Graphics g = pDC->GetSafeHdc();
Pen pen(theColor, penWidth);
SolidBrush brush(fillColor);
g.SetSmoothingMode(SmoothingModeAntiAlias);
g.FillEllipse(&brush, *enclosingRect);
g.DrawEllipse(&pen, *enclosingRect);
}
示例3: onPaintBkg
void UIButton::onPaintBkg(Graphics& graphics, Rect rect)
{
SolidBrush brush(m_color);
switch (m_buttonType)
{
case UITYPE_BUTTON_RECTANGLE:
graphics.FillRectangle(&brush, rect);
break;
case UITYPE_BUTTON_CIRCLE:
graphics.FillEllipse(&brush, rect);
break;
default:
break;
}
}
示例4: DrawHotShape
void CToolRegularRuler::DrawHotShape(Graphics& graph)
{
SolidBrush sbrush(Color::Green);
Pen penDraw(Color::Blue, 2);
penDraw.SetDashStyle(DashStyleDot);
PointF pt((m_ptary[0].X + m_ptary[1].X) / 2, m_ptary[0].Y);
graph.DrawLine(&penDraw, pt, m_HotPts.ptRotate);
graph.FillEllipse(&sbrush, m_HotPts.ptRotate.X - HOTINTERVAL,
m_HotPts.ptRotate.Y - HOTINTERVAL,
2.0 * HOTINTERVAL, 2.0 * HOTINTERVAL);
penDraw.SetDashStyle(DashStyleDash);
penDraw.SetColor(Color::Red);
graph.DrawRectangle(&penDraw, m_rcGrip.left, m_rcGrip.top, m_rcGrip.Width(), m_rcGrip.Height());
}