当前位置: 首页>>代码示例>>C++>>正文


C++ Graphics::FillEllipse方法代码示例

本文整理汇总了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);
}
开发者ID:lilingshui,项目名称:code-refrence,代码行数:35,代码来源:CAngleLabel.cpp

示例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);
}
开发者ID:hlobit,项目名称:SimPetri,代码行数:11,代码来源:CircleView.cpp

示例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;
    }
}
开发者ID:smithLiLi,项目名称:dev,代码行数:15,代码来源:UIComomCtrls.cpp

示例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());
}
开发者ID:lilingshui,项目名称:code-refrence,代码行数:18,代码来源:CToolRegularRuler.cpp


注:本文中的Graphics::FillEllipse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。