|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Image Transforms subsystem. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CVTIMAGEROTATORIMPLCLOCKWISE_H |
|
22 #define CVTIMAGEROTATORIMPLCLOCKWISE_H |
|
23 |
|
24 // INCLUDE FILES |
|
25 |
|
26 #include "CVtImageRotatorImpl.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 class CVtImage; |
|
31 |
|
32 // CLASS DECLARATIONS |
|
33 |
|
34 /** |
|
35 * Image scaler implementation. |
|
36 * |
|
37 * @lib videosource.lib |
|
38 */ |
|
39 class CVtImageRotatorImplClockwise : public CVtImageRotatorImpl |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * C++ constructor |
|
44 * @param "aAngle" Selected rotation angle. |
|
45 */ |
|
46 CVtImageRotatorImplClockwise( const CVtImageRotator::TRotationAngle& aAngle ); |
|
47 |
|
48 /** |
|
49 * Rotates the image. |
|
50 * @param "aContinue" When method returns, this parameter will contain |
|
51 * ETrue if new call is needed (i.e. scaling is not yet finished) or |
|
52 * EFalse if scaling is complete. |
|
53 * @return KErrNone or one of the system wide error codes. |
|
54 */ |
|
55 TInt Rotate( TBool& aContinue ); |
|
56 |
|
57 /** |
|
58 * Source and target image validation method. |
|
59 * @param "aSource" Constant reference to source image. |
|
60 * @param "aTarget" Constant reference to target image. |
|
61 * @exception If source or target is not valid, this method leaves |
|
62 * with KErrNotSupported. |
|
63 */ |
|
64 void ValidateSourceTargetL( |
|
65 const CVtImage& aSource, |
|
66 CVtImage& aTarget ); |
|
67 |
|
68 /** |
|
69 * Method for checking specific rotation angle support. |
|
70 * @param "aAngle" Rotation type that will be needed. |
|
71 * @return ETrue if aAngle is one of the supported rotation types |
|
72 * EFalse otherwise. |
|
73 */ |
|
74 TBool SupportsRotationAngle( const CVtImageRotator::TRotationAngle& aAngle ); |
|
75 |
|
76 private: |
|
77 |
|
78 /** |
|
79 * The rotation implementation. |
|
80 */ |
|
81 void DoRotate(); |
|
82 |
|
83 /** |
|
84 * The rotation implementation for YUV planes. |
|
85 * @param "aSource" Constant pointer to source plane. |
|
86 * @param "aTarget" Pointer to target plane. |
|
87 * @param "aWidth" Width of the plane in pixels. |
|
88 * @param "aHeight" Height of the plane in pixels. |
|
89 * @param "aBytesPerRow" Bytes per row in plane. |
|
90 */ |
|
91 void RotatePlane( |
|
92 const TUint8* aSource, |
|
93 TUint8* aTarget, |
|
94 TInt aSourceWidth, |
|
95 TInt aSourceHeight, |
|
96 TInt aSourceBytesPerRow, |
|
97 TInt aTargetHeight, |
|
98 TInt aTargetBytesPerRow ); |
|
99 }; |
|
100 |
|
101 #endif // CVTIMAGEROTATORIMPLCLOCKWISE_H |
|
102 |
|
103 // End of File |
|
104 |
|
105 |