0
点赞
收藏
分享

微信扫一扫

CGDIplus2Dlg::OnDrawBezier()

q松_松q 2023-06-16 阅读 47


void CGDIplus2Dlg::OnDrawCurve() 
{


CClientDC dc(this);
HDC hdc=dc.m_hDC;
Graphics  myGraphics(hdc);

Point myPointArray[] =
   {Point(0, 0), Point(50, 30), Point(30, 60)};

Pen myPen(Color(255,0,0,255),2);
	
	myGraphics.DrawCurve(&myPen, myPointArray, 3, 1.5f);

}

void CGDIplus2Dlg::OnDrawBezier() 
{
	CClientDC dc(this);
HDC hdc=dc.m_hDC;
Graphics  myGraphics(hdc);

Pen myPen(Color(255,255,0,0),1);
myGraphics.DrawBezier(&myPen, 0, 0, 40, 20, 80, 150, 100, 10);	

{
	Graphics*    myGraphics;
	
	HDC hdc=::GetDC(this->m_StaticWindow.m_hWnd);
	
	myGraphics=new Graphics(hdc);
	Point myPointArray[] =
	   {Point(0, 0), Point(40, 20), Point(80, 150), Point(100, 10)};

	Pen myPen(Color(255,0,255,0),1);

	myGraphics->DrawPolygon(&myPen, myPointArray, 4);
	delete myGraphics;
	::ReleaseDC(this->m_StaticWindow.m_hWnd,hdc);
}
}



举报

相关推荐

2020/2/22-2

javase 2-2 类

单链表2-2

技术2---swagger2

2

0 条评论