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

Definition at line 37 of file rectangle.h.
Public Member Functions |
|
| IMPORT_C | TRectangle (const TPoint &aOrigin, TInt aWidth, TInt aHeight) |
| IMPORT_C | TRectangle () |
| 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 | iWidth |
| TInt | iHeight |
|
||||||||||||||||
|
TRectangle Create an instance of TRectangle at a specified position, and of a specified size.
Definition at line 28 of file rectangle.cpp. 00028 : 00029 TShape( KRectangle, aOrigin ), 00030 iWidth( aWidth ), 00031 iHeight( aHeight ) 00032 { 00033 // Create an instance of TRectangle at a specified position, 00034 // and of a specified size. 00035 // No implementation required 00036 }
|
|
|
TRectangle Create an instance of TRectangle Definition at line 44 of file rectangle.cpp. 00044 : TShape( KRectangle, TPoint( 0,0 ) ), 00045 iWidth( 0 ), 00046 iHeight( 0 ) 00047 { 00048 // Create an instance of TRectangle 00049 // No implementation required 00050 }
|
|
|
Draw Virtual method that draws the shape to the specified graphics context.
Implements NShapes::TShape. Definition at line 57 of file rectangle.cpp. References GetRect(). 00058 { 00059 aActiveGraphicsContext.DrawRect( GetRect() ); 00060 }
|
|
|
GetRect Return the smallest bounding rectangle that entirely contains the shape.
Implements NShapes::TShape. Definition at line 67 of file rectangle.cpp. References iHeight, NShapes::TShape::iOrigin, and iWidth. Referenced by Draw().
|
|
|
ExternalizeL Virtual method that writes the shape to the specified write stream.
Reimplemented from NShapes::TShape. Definition at line 77 of file rectangle.cpp. References NShapes::TShape::ExternalizeL(), iHeight, and iWidth. 00078 { 00079 TShape::ExternalizeL( aStream ); 00080 aStream.WriteInt32L( iWidth ); 00081 aStream.WriteInt32L( iHeight ); 00082 }
|
|
|
InternalizeL Virtual method that reads the shape from the specified read stream.
Reimplemented from NShapes::TShape. Definition at line 89 of file rectangle.cpp. References iHeight, NShapes::TShape::InternalizeL(), and iWidth. 00090 { 00091 TShape::InternalizeL( aStream ); 00092 iWidth = aStream.ReadInt32L(); 00093 iHeight = aStream.ReadInt32L(); 00094 }
|
|
|
ReadShapeTypeL Static method that reads the type of the next shape from a stream.
Definition at line 44 of file shape.cpp.
|
|
|
iWidth The width of the rectangle Definition at line 98 of file rectangle.h. Referenced by ExternalizeL(), GetRect(), and InternalizeL(). |
|
|
iHeight The height of the rectangle Definition at line 101 of file rectangle.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(), GetRect(), NShapes::TCircle::GetRect(), and NShapes::TShape::InternalizeL(). |
|
© Nokia 2009 |