diff -r 80ef3a206772 -r 48780e181b38 Symbian3/SDK/Source/GUID-A5693758-495B-598E-A514-24C48D459BB6.dita --- a/Symbian3/SDK/Source/GUID-A5693758-495B-598E-A514-24C48D459BB6.dita Fri Jul 16 17:23:46 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-A5693758-495B-598E-A514-24C48D459BB6.dita Tue Jul 20 12:00:49 2010 +0100 @@ -23,7 +23,7 @@ gc.DrawEllipse(ellipseRect); ...
How to draw an arc

An arc is drawn as a portion of an ellipse. As well as the ellipse rectangle, the call must specify the two points: the first defines one end of a line from the geometric center of the ellipse; the point of intersection between this line and the ellipse defines the start point of the arc. The second specified point acts in the same way for the end of the arc.

Arc construction -

The example code here shows how an arc is drawn in an anti-clockwise direction using constructionPoint1 and constructionPoint2 as the start to the end points.

... +

The example code here shows how an arc is drawn in an anti-clockwise direction using constructionPoint1 and constructionPoint2 as the start to the end points.

... // draw an arc centered in the rectangle gc.DrawArc(ellipseRect,constructionPoint1,constructionPoint2); ...

You can reverse the pair of construction point arguments to draw the other half of the ellipse. The construction points and screen center are also drawn, with dotted construction lines:

... @@ -42,7 +42,7 @@ gc.Plot(screenCenterPoint); ...
Drawing pie slices

The example code here shows how two pie slices are drawn. A pie slice is the area bounded by:

an arc as used above

the straight line from the start point from the geometric center of the ellipse

the straight line from the end point from the geometric center of the ellipse

Pie slice construction -

Solid and patterned brush styles are used to fill the portions of the elliptical disc.

  1. Use SetBrushStyle() to set the brush style to solid.

  2. Use SetBrushColour() to set the brush color to black.

  3. Use DrawPie() to draw a pie slice.

  4. Use SetBrushStyle() to set the patterned brush style.

  5. Use DrawPie() and reverse the pair of construction point arguments so that the two pie slices together form a whole ellipse.

... +

Solid and patterned brush styles are used to fill the portions of the elliptical disc.

  1. Use SetBrushStyle() to set the brush style to solid.

  2. Use SetBrushColour() to set the brush color to black.

  3. Use DrawPie() to draw a pie slice.

  4. Use SetBrushStyle() to set the patterned brush style.

  5. Use DrawPie() and reverse the pair of construction point arguments so that the two pie slices together form a whole ellipse.

... // draw a pie slice centered in the rectangle gc.SetBrushStyle(CGraphicsContext::ESolidBrush); gc.SetBrushColor(black);