First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __BITDRAWSCALING_H__
17 #define __BITDRAWSCALING_H__
20 MScalingSettings interface manages X-axis and Y-axis scaling factors of CFbsDrawDevice interface.
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.
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!
30 MScalingSettings interface offers following methods:
31 Get(), Set(), IsScalingOff().
36 class MScalingSettings
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.
50 virtual TInt Set(TInt aFactorX, TInt aFactorY, TInt aDivisorX, TInt aDivisorY) = 0;
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.
59 virtual void Get(TInt& aFactorX, TInt& aFactorY, TInt& aDivisorX, TInt& aDivisorY) = 0;
61 Notifies the caller whether the drawing device is scaled or not.
62 @return ETrue Drawing device is not scaled, EFalse - it is scaled.
65 virtual TBool IsScalingOff() = 0;
68 #endif//__BITDRAWSCALING_H__