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


C++ GraphicsPath::Outline方法代码示例

本文整理汇总了C++中GraphicsPath::Outline方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphicsPath::Outline方法的具体用法?C++ GraphicsPath::Outline怎么用?C++ GraphicsPath::Outline使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GraphicsPath的用法示例。


在下文中一共展示了GraphicsPath::Outline方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: endPoly

void ToolSelectPoly::endPoly()
{
	this->endPaint();

	this->isSelecting = false;

	if( this->poly != NULL ){
		if( this->poly->getCount() > 3 ){
			if( this->mode == ICC_LASMOS ){
				delete this->poly->removeTail();
				this->setSelection(this->poly,true,true,true);
			}
			else {
				GraphicsPath *path = new GraphicsPath();
				path->AddLines(this->poly->toArray(),this->poly->getCount());
				path->Outline();
				this->setSelection(path,true,this->isCtrl);
			}
		}
	}
	else {
		this->setSelection(NULL,true);
	}

	this->resetOldPath();

	delete this->poly;
	this->poly = NULL;
}
开发者ID:f055,项目名称:fedit-image-editor,代码行数:29,代码来源:ToolSelectPoly.cpp

示例2: SetRegion

void CLTriangle::SetRegion()
{
	PointF* pPt = m_ptary.GetData();
	Pen penDraw(Color(255, 0, 255, 0));
	penDraw.SetDashStyle(m_nDashStyle);
	penDraw.SetWidth((float)m_nWidth);
	
	GraphicsPath path;
	path.AddPolygon(pPt,m_nPtCount);
	path.Widen(&penDraw);
	path.Outline();

	m_Region.MakeEmpty();
	m_Region.Union(&path);
}
开发者ID:lilingshui,项目名称:code-refrence,代码行数:15,代码来源:CLTriangle.cpp

示例3: SetRegion

void CFlatBrushPen::SetRegion()
{
	ASSERT(m_bFinish);
	PointF* pPt = m_ptary.GetData();
	float fwidth = m_nWidth * m_fScale;

	Pen penDraw(m_crColor, fwidth);
	penDraw.ScaleTransform(1, 2.0f / fwidth, MatrixOrderAppend);
	penDraw.RotateTransform(m_ftransAngle, MatrixOrderAppend);

	GraphicsPath path;
	path.AddCurve(pPt, m_nPtCount);
	path.Widen(&penDraw);
	path.Outline();

	m_Region.MakeEmpty();
	m_Region.Union(&path);
}
开发者ID:chenboo,项目名称:code-refrence,代码行数:18,代码来源:CFlatBrushPen.cpp

示例4: SetRegion

void CTransparentPen::SetRegion()
{
	PointF* pPt = m_ptary.GetData();

	Pen penDraw(m_crColor);
	penDraw.SetStartCap(LineCapRound);
	penDraw.SetEndCap(LineCapRound);
	penDraw.SetLineJoin(LineJoinRound);
	penDraw.SetWidth(m_nWidth * m_fScale);

	GraphicsPath path;
	path.AddCurve(pPt,m_nPtCount,0.8f);
	path.Widen(&penDraw);
	path.Outline();

	m_Region.MakeEmpty();
	m_Region.Union(&path);
}
开发者ID:lilingshui,项目名称:code-refrence,代码行数:18,代码来源:CTransparentPen.cpp

示例5: SetRegion

void CTriangle::SetRegion()
{
	PointF* pPt = m_ptary.GetData();

	int nWidth = m_nWidth;
	if(m_nWidth < 6)
	{
		nWidth = 6;
	}

	Pen greenPen(Color(255, 0, 255,  0), (float)nWidth);
	GraphicsPath path;
	path.AddPolygon(pPt,m_nPtCount);
	path.Widen(&greenPen);
	path.Outline();

	m_Region.MakeEmpty();
	m_Region.Union(&path);
}
开发者ID:lilingshui,项目名称:code-refrence,代码行数:19,代码来源:CTriangle.cpp

示例6: SetRegion

void CNormalPen::SetRegion()
{
	ASSERT(m_bFinish);
	PointF* pPt = m_ptary.GetData();
	Pen penDraw(m_crColor);
	penDraw.SetWidth(m_nWidth * m_fScale);

	penDraw.SetEndCap(m_nEndCap);
	penDraw.SetStartCap(m_nStartCap);
	penDraw.SetDashStyle(m_nDashStyle);
	penDraw.SetLineJoin(LineJoinRound);

	GraphicsPath path;
	path.AddCurve(pPt,m_nPtCount);
	path.Widen(&penDraw);
	path.Outline();

	m_Region.MakeEmpty();
	m_Region.Union(&path);
}
开发者ID:chenboo,项目名称:code-refrence,代码行数:20,代码来源:CNormalPen.cpp

示例7: SetRegion

void CRectangle::SetRegion()
{
	float left = min(m_ptary[0].X,m_ptary[1].X);
	float top = min(m_ptary[0].Y,m_ptary[1].Y);
	float width = fabs(m_ptary[0].X - m_ptary[1].X);
	float height = fabs(m_ptary[0].Y - m_ptary[1].Y);
	/*PointF* pPt = m_ptary.GetData();*/

	int nWidth = m_nWidth;
	if(m_nWidth < 6)
	{
		nWidth = 6;
	}

	Pen greenPen(Color(255, 0, 255,  0), (float)nWidth);
	GraphicsPath path;
	if(RS_ROUND == m_nRStyle)
	{
		CRect rc((int)left,(int)top,(int)(left + width),(int)(top + height));
		INT offsetX = (rc.right - rc.left) * 20/100;  
		INT offsetY = (rc.bottom - rc.top) * 20/100;
		path.AddArc(rc.right - offsetX, rc.top, offsetX, offsetY, 270, 90);
		path.AddArc(rc.right - offsetX, rc.bottom - offsetY, offsetX, offsetY, 0, 90);
		path.AddArc(rc.left, rc.bottom - offsetY, offsetX, offsetY, 90, 90);
		path.AddArc(rc.left, rc.top, offsetX, offsetY, 180, 90);
		path.AddLine(rc.left + offsetX, rc.top, rc.right - offsetX/2, rc.top);
	}
	else
	{

		RectF rcf(left,top,width,height);
		path.AddRectangle(rcf);
	}

	path.Widen(&greenPen);
	path.Outline();

	m_Region.MakeEmpty();
	m_Region.Union(&path);
}
开发者ID:lilingshui,项目名称:code-refrence,代码行数:40,代码来源:CRectangle.cpp

示例8: SetRegion

void CAngleLabel::SetRegion()
{
	PointF* pPt = m_ptary.GetData();

	PointF ptd[3];
	ptd[0] = pPt[1];
	ptd[1] = pPt[0];
	ptd[2] = pPt[2];

	Pen penDraw(Color(255, 0, 255, 0));
	penDraw.SetDashStyle(m_nDashStyle);
	penDraw.SetWidth((float)m_nWidth);
	
	GraphicsPath path;
	path.AddLines(ptd, m_nPtCount);

	path.Widen(&penDraw);
	path.Outline();

	m_Region.MakeEmpty();
	m_Region.Union(&path);
}
开发者ID:lilingshui,项目名称:code-refrence,代码行数:22,代码来源:CAngleLabel.cpp

示例9: SetRegion

void CNormalPen::SetRegion()
{
	PointF* pPt = m_ptary.GetData();

	int nWidth = m_nWidth;
	if(m_nWidth < 3)
	{
		nWidth = 3;
	}

	Pen penDraw(m_crColor,(float)nWidth);
	penDraw.SetDashStyle(m_nDashStyle);
	penDraw.SetStartCap(m_nStartCap);
	penDraw.SetEndCap(m_nEndCap);
	penDraw.SetLineJoin(LineJoinRound);

	GraphicsPath path;
	path.AddCurve(pPt,m_nPtCount);
	path.Widen(&penDraw);
	path.Outline();

	m_Region.MakeEmpty();
	m_Region.Union(&path);
}
开发者ID:lilingshui,项目名称:code-refrence,代码行数:24,代码来源:CNormalPen.cpp


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