FillPie
FillPie方法用于填充饼形图,饼形图是一个圆形(或椭圆)的一部分,FillPie的法为:
FillPie(color, rect, startAngle, sweepAngle)
FillPie(brush, rect, startAngle, sweepAngle)
参数 | 说明 |
color | 填充颜色 |
brush | 填充画刷 |
rect | RectangleF类型,用于定义圆形(或椭圆)所在的四边形 |
startAngle | 饼形图的起始角度 |
sweepAngle | 饼形图的扫掠角度 |
示例
Dim
file
As
String
=
"c:\temp\test.pdf"
Dim
pdc
As
New
PDFCreator()
Dim
rect
As
New
RectangleF(100, 100, 250, 250)
pdc.DrawRectangle(pens.PowderBlue, rect,
New
SizeF(10, 10))
Dim
statAngle
As
Integer
= 0
Dim
sweepAngle
As
Integer
= 45
Dim
myColors()
As
Color = {color.Red, color.Green, Color.Blue, color.LightSeaGreen,
color.LightGreen}
For
i
As
Integer
= 0
To
4
pdc.FillPie(myColors(i), rect, statAngle, sweepAngle)
statAngle = statAngle + sweepAngle
Next
pdc.Save(file)
pdc.Show()
生成的文档为: