小编Pus*_*007的帖子

如何在Windows手机中动态绘制扇区(Quarter Circle)?

我想在图像中绘制Shape. 弧或半圆 扇区或季度圈 我使用Arc Segment绘制了一半圆圈,现在我想绘制四分之一圆或A扇区,但是我无法绘制它.

我使用此代码绘制Arc,我试图改变大小,角度也不起作用.

我应该怎么做四分之一圈/扇区?我以前用于绘制Arc的代码是:

PathFigure pthFigure1 = new PathFigure();
pthFigure1.StartPoint = new Point(50, 60);// starting cordinates of arcs
ArcSegment arcSeg1 = new ArcSegment();
arcSeg1.Point = new Point(100, 82);   // ending cordinates of arcs
arcSeg1.Size = new Size(10, 10);

arcSeg1.IsLargeArc = false;
arcSeg1.SweepDirection = SweepDirection.Clockwise;
arcSeg1.RotationAngle = 90;
PathSegmentCollection myPathSegmentCollection1 = new PathSegmentCollection();
myPathSegmentCollection1.Add(arcSeg1);
pthFigure1.Segments = myPathSegmentCollection1;
PathFigureCollection pthFigureCollection1 = new PathFigureCollection();
pthFigureCollection1.Add(pthFigure1);
PathGeometry pthGeometry1 = new PathGeometry();
pthGeometry1.Figures = pthFigureCollection1;
System.Windows.Shapes.Path arcPath1 = new System.Windows.Shapes.Path();
arcPath1.Data = pthGeometry1;
arcPath1.Fill …
Run Code Online (Sandbox Code Playgroud)

c# silverlight windows-phone

2
推荐指数
1
解决办法
2920
查看次数

标签 统计

c# ×1

silverlight ×1

windows-phone ×1