|
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This is the implementation of the BitmapTransforms Library |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __BitmapScalingBody_inl |
|
19 #define __BitmapScalingBody_inl |
|
20 |
|
21 #include "BitmapTransformsMain.h" |
|
22 |
|
23 /** |
|
24 * |
|
25 * Begins the bitmap re-scaling operation. |
|
26 * |
|
27 * The scaling factor is based on the relative value of the source bitmap |
|
28 * size and the explicitly supplied size. The operation is asynchronous. |
|
29 * When it is complete, successfully or otherwise, the |
|
30 * <code>TRequestStatus</code>& is set, passing the state of the operation. |
|
31 * |
|
32 * @param "TRequestStatus* aRequestStatus" |
|
33 * |
|
34 * @param "CFbsBitmap& aBitmap" |
|
35 * The bitmap to be re-scaled. This reference is also the |
|
36 * target location for the re-scaled bitmap. |
|
37 * @param "const TSize& aDestinationSize" |
|
38 * The requested target size for the re-scaled bitmap. |
|
39 * @param "TBool aMaintainAspectRatio = ETrue" |
|
40 * <code>ETrue</code> - the aspect ratio is retained; |
|
41 * this is the default. The same scaling factor is |
|
42 * applied in both the horizontal and vertical |
|
43 * directions. This is the smaller of the horizontal |
|
44 * scaling factor and the vertical scaling factor. |
|
45 * <code>EFalse</code> - the aspect ratio need not be |
|
46 * retained. |
|
47 * |
|
48 */ |
|
49 inline void CBitmapScalerBody::Scale(TRequestStatus* aRequestStatus, |
|
50 CFbsBitmap& aBitmap, |
|
51 const TSize& aDestinationSize, |
|
52 TBool aMaintainAspectRatio) |
|
53 { |
|
54 iPlugin->Scale(aRequestStatus, aBitmap, aDestinationSize, aMaintainAspectRatio); |
|
55 } |
|
56 |
|
57 inline void CBitmapScalerBody::Cancel() |
|
58 { |
|
59 iPlugin->Cancel(); |
|
60 } |
|
61 |
|
62 |
|
63 #endif // __BitmapScalingBody_inl |