|
Nokia N97 SDK Example Applications Guide |
#include <circle.h>
Inheritance diagram for NShapes::TCircle:

Definition at line 37 of file circle.h.
Public Member Functions |
|
| IMPORT_C | TCircle (const TPoint &aCenter, TInt aRadius) |
| IMPORT_C | TCircle () |
| IMPORT_C void | Draw (CWindowGc &aActiveGraphicsContext) const |
| IMPORT_C TRect | GetRect () const |
| IMPORT_C void | ExternalizeL (RWriteStream &aStream) const |
| IMPORT_C void | InternalizeL (RReadStream &aStream) |
Static Public Member Functions |
|
| static IMPORT_C TShapeType | ReadShapeTypeL (RReadStream &aStream) |
Protected Attributes |
|
| const TShapeType | iShapeType |
| TPoint | iOrigin |
Private Attributes |
|
| TInt | iRadius |
|
||||||||||||
|
TCircle. Create an instance of TCircle at a specified position, and of a specified radius.
Definition at line 31 of file circle.cpp. 00032 : TShape( KCircle, aCenter - TSize( aRadius, aRadius ) ), 00033 iRadius( aRadius ) 00034 { 00035 // Create an instance of TCircle at a specified position, 00036 // and of a specified radius. 00037 // No implementation required 00038 }
|
|
|
TCircle. Create an instance of TCircle Definition at line 45 of file circle.cpp. 00045 : TShape( KCircle, TPoint( 0,0 ) ), iRadius( 0 ) 00046 { 00047 // Create an instance of TCircle. 00048 // No implementation required 00049 }
|
|
|
Draw Virtual method that draws the shape to the specified graphics context.
Implements NShapes::TShape. Definition at line 57 of file circle.cpp. References GetRect(). 00058 { 00059 aActiveGraphicsContext.DrawEllipse( GetRect() ); 00060 }
|
|
|
GetRect Return the smallest bounding rectangle that entirely contains the shape.
Implements NShapes::TShape. Definition at line 68 of file circle.cpp. References NShapes::TShape::iOrigin, and iRadius. Referenced by Draw().
|
|
|
ExternalizeL Virtual method that writes the shape to the specified write stream.
Reimplemented from NShapes::TShape. Definition at line 78 of file circle.cpp. References NShapes::TShape::ExternalizeL(), and iRadius. 00079 { 00080 TShape::ExternalizeL( aStream ); 00081 aStream.WriteInt32L( iRadius ); 00082 }
|
|
|
InternalizeL Virtual method that reads the shape from the specified read stream.
Reimplemented from NShapes::TShape. Definition at line 89 of file circle.cpp. References NShapes::TShape::InternalizeL(), and iRadius. 00090 { 00091 TShape::InternalizeL( aStream ); 00092 iRadius = aStream.ReadInt32L(); 00093 }
|
|
|
ReadShapeTypeL Static method that reads the type of the next shape from a stream.
Definition at line 44 of file shape.cpp.
|
|
|
iRadius, The Radius of the circle Definition at line 98 of file circle.h. Referenced by ExternalizeL(), GetRect(), and InternalizeL(). |
|
|
iShapeType The type of the actual shape Definition at line 110 of file shape.h. Referenced by NShapes::TShape::ExternalizeL(). |
|
|
iOrigin The origin of the shape Definition at line 113 of file shape.h. Referenced by NShapes::TShape::ExternalizeL(), NShapes::TRectangle::GetRect(), GetRect(), and NShapes::TShape::InternalizeL(). |
|
© Nokia 2009 |