diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-B32ED85A-913E-5C06-AEEB-1E2D6EF4CECF.dita --- a/Symbian3/SDK/Source/GUID-B32ED85A-913E-5C06-AEEB-1E2D6EF4CECF.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-B32ED85A-913E-5C06-AEEB-1E2D6EF4CECF.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,30 +1,30 @@ - - - - - -Drawing a Rounded Rectangle

This topic provides an example that demonstrates how to draw a rounded rectangle using DrawRoundRect(). The dimensions of each corner (corner size and corner height) are given by a TSize argument.

- Rounded rectangle construction - ... -// draw a rectangle with rounded corners, centered in the rectangle -TSize cornerSize(20,20); // set up the size of a rounded cornerSize -gc.DrawRoundRect(box,cornerSize); -...

In the following example code, one of the ellipses specified by the corner argument is shown, to illustrate how the rounded rectangle is constructed:

... -// draw a rectangle with rounded corners, -//centered in the rectangle, showing a corner ellipse -TSize cornerSize(20,20); // size of a rounded corner - -// rect for corner ellipse is twice the corner size -TSize cornerEllipseSize(cornerSize.iHeight*2,cornerSize.iWidth*2); -TRect cornerRectTl(box.iTl,cornerEllipseSize); -gc.DrawRoundRect(box,cornerSize); -gc.SetPenStyle(CGraphicsContext::EDottedPen); -gc.DrawEllipse(cornerRectTl); // corner construction ellipse -...
Drawing + + + + + +Drawing a Rounded Rectangle

This topic provides an example that demonstrates how to draw a rounded rectangle using DrawRoundRect(). The dimensions of each corner (corner size and corner height) are given by a TSize argument.

+ Rounded rectangle construction + ... +// draw a rectangle with rounded corners, centered in the rectangle +TSize cornerSize(20,20); // set up the size of a rounded cornerSize +gc.DrawRoundRect(box,cornerSize); +...

In the following example code, one of the ellipses specified by the corner argument is shown, to illustrate how the rounded rectangle is constructed:

... +// draw a rectangle with rounded corners, +//centered in the rectangle, showing a corner ellipse +TSize cornerSize(20,20); // size of a rounded corner + +// rect for corner ellipse is twice the corner size +TSize cornerEllipseSize(cornerSize.iHeight*2,cornerSize.iWidth*2); +TRect cornerRectTl(box.iTl,cornerEllipseSize); +gc.DrawRoundRect(box,cornerSize); +gc.SetPenStyle(CGraphicsContext::EDottedPen); +gc.DrawEllipse(cornerRectTl); // corner construction ellipse +...
Drawing to a Graphics Context Tutorials Drawing and Graphics Contexts
\ No newline at end of file