|
1 // Copyright (c) 2004-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 // |
|
15 |
|
16 #ifndef __BITDRAWSCALING_H__ |
|
17 #define __BITDRAWSCALING_H__ |
|
18 |
|
19 /** |
|
20 MScalingSettings interface manages X-axis and Y-axis scaling factors of CFbsDrawDevice interface. |
|
21 |
|
22 The interface could be retrieved calling CFbsDrawDevice::GetInterface() with |
|
23 KScalingSettingsInterfaceID as an argument. |
|
24 If the draw device does not have support for scaling, MScalingSettings cannot be retrieved. |
|
25 |
|
26 MScalingSettings interface lifetime is the same as the lifetime of CFbsDrawDevice |
|
27 interface, which creates it. |
|
28 Do not try to delete MScalingSettings interface pointer! |
|
29 |
|
30 MScalingSettings interface offers following methods: |
|
31 Get(), Set(), IsScalingOff(). |
|
32 |
|
33 @see CFbsDrawDevice |
|
34 @internalTechnology |
|
35 */ |
|
36 class MScalingSettings |
|
37 { |
|
38 public: |
|
39 /** |
|
40 Sets scaling factor by which the drawing device should scale the drawing images. |
|
41 If you want to un-scale the device, call Set() with factorX = 1, |
|
42 factorY = 1, divisorX = 1, divisorY = 1. |
|
43 @param aFactorX Scaling factor for the X-axis of the screen device. |
|
44 @param aFactorY Scaling factor for the y-axis of the screen device. |
|
45 @param aDivisorX Not used. Should be set to 1. |
|
46 @param aDivisorY Not used. Should be set to 1. |
|
47 @return KErrNone success. |
|
48 @internalTechnology |
|
49 */ |
|
50 virtual TInt Set(TInt aFactorX, TInt aFactorY, TInt aDivisorX, TInt aDivisorY) = 0; |
|
51 /** |
|
52 Retrieves X-axis and Y-axis scaling factors. |
|
53 @param aFactorX Upon return contains X-axis scaling factor. |
|
54 @param aFactorY Upon return contains Y-axis scaling factor. |
|
55 @param aDivisorX Upon return contains the decimal fraction of X-axis scaling factor. |
|
56 @param aDivisorY Upon return contains the decimal fraction of Y-axis scaling factor. |
|
57 @internalTechnology |
|
58 */ |
|
59 virtual void Get(TInt& aFactorX, TInt& aFactorY, TInt& aDivisorX, TInt& aDivisorY) = 0; |
|
60 /** |
|
61 Notifies the caller whether the drawing device is scaled or not. |
|
62 @return ETrue Drawing device is not scaled, EFalse - it is scaled. |
|
63 @internalTechnology |
|
64 */ |
|
65 virtual TBool IsScalingOff() = 0; |
|
66 }; |
|
67 |
|
68 #endif//__BITDRAWSCALING_H__ |