描述
画一个馅饼.
C++ Syntax
Status DrawPie( [in] const Pen *pen, [in] REAL x, [in] REAL y, [in] REAL width, [in] REAL height, [in] REAL startAngle, [in] REAL sweepAngle ); |
Status DrawPie( [in] const Pen *pen, [in] INT x, [in] INT y, [in] INT width, [in] INT height, [in] INT startAngle, [in] INT sweepAngle ); |
Status DrawPie( [in] const Pen *pen, [in, ref] const RectF &rect, [in] REAL startAngle, [in] REAL sweepAngle ); |
Status DrawPie( [in] const Pen *pen, [in, ref] const Rect &rect, [in] REAL startAngle, [in] REAL sweepAngle ); |
FreeBASIC 语法
FUNCTION DrawPie ( _ BYVAL pPen AS CGpPen PTR, _ BYVAL x AS SINGLE, _ BYVAL y AS SINGLE, _ BYVAL nWidth AS SINGLE, _ BYVAL nHeight AS SINGLE, _ BYVAL startAngle AS SINGLE, _ BYVAL sweepAngle AS SINGLE _ ) AS GpStatus |
FUNCTION DrawPie ( _ BYVAL pPen AS CGpPen PTR, _ BYVAL x AS INT_, _ BYVAL y AS INT_, _ BYVAL nWidth AS INT_, _ BYVAL nHeight AS INT_, _ BYVAL startAngle AS INT_, _ BYVAL sweepAngle AS INT_ _ ) AS GpStatus |
FUNCTION DrawPie ( _ BYVAL pPen AS CGpPen PTR, _ BYVAL rc AS GpRectF, _ BYVAL startAngle AS SINGLE, _ BYVAL sweepAngle AS SINGLE _ ) AS GpStatus |
FUNCTION DrawPie ( _ BYVAL pPen AS CGpPen PTR, _ BYVAL rc AS GpRect, _ BYVAL startAngle AS INT_, _ BYVAL sweepAngle AS INT_ _ ) AS GpStatus |
参数
pPen
[in]指针的那一支钢笔是用来画馅饼.
x
[in]单精度数,指定矩形左上角的X坐标范围,椭圆画的饼.
y
[in]单精度数,指定矩形左上角的坐标范围,椭圆画的饼.
nWidth
[in]单精度数指定矩形的宽度范围,椭圆画的饼.
nHeight
[in]简单精度数指定矩形的高度范围,椭圆画的饼.
startAngle
[in]简单精度数指定的角度,以度,X轴和定义馅饼圆弧的起始点之间.正值指定顺时针旋转.
nHeight
[in]简单精度数指定的角度,开始和结束的定义派弧点之间.正值指定顺时针旋转.
返回值
如果该方法成功,则返回Ok,这是对Status枚举元素.
如果这个方法失败,它返回一个枚举的其他元素的Status.
引用文件
CGpBitmap.inc (include CGdiPlus.inc)
示例
' ========================================================================================
' The following example draws a pie.
' ========================================================================================
SUB Example_DrawPie (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context
DIM graphics AS CGpGraphics = hdc
' // Get the DPI scaling ratio
DIM rxRatio AS SINGLE = graphics.GetDpiX / 96
DIM ryRatio AS SINGLE = graphics.GetDpiY / 96
' // Set the scale transform
graphics.ScaleTransform(rxRatio, ryRatio)
' // Draw the pie
DIM blackPen AS CGpPen = CGpPen(GDIP_ARGB(255, 0, 0, 0), 3)
graphics.DrawPie(@blackPen, 0.0, 0.0, 200.0, 100.0, 0.0, 45.0)
END SUB
' ========================================================================================


