
填充 GraphicsPath 的内世枯拍败咐部。
public void FillPathEllipse(PaintEventArgs e)
{
/搜羡/ Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red)
// Create graphics path object and add ellipse.
GraphicsPath graphPath = new GraphicsPath()
graphPath.AddEllipse(0, 0, 200, 100)
// Fill graphics path to screen.
e.Graphics.FillPath(redBrush, graphPath)
}
要不你这样看看
Graphics g = this.CreateGraphics()
Brush t=new SolidBrush(Color.Red)
g.FillPath(t,??)
2、首先将椭圆的方程改写好扮为参数方程友笑灶。
3、启动matlab写入:
>>t=linspace(0,2*pi,1000)
>>x=-2+2*cos(t)
>>y=6+3*sin(t)
>>plot(x,y),grid on
4、在代码框回车可以直接执行代码,画出椭圆。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)