1.1 --- a/epoc32/include/bitstd.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/bitstd.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
1.4 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 // All rights reserved.
1.6 // This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 // which accompanies this distribution, and is available
1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 //
1.13 // Initial Contributors:
1.14 // Nokia Corporation - initial contribution.
1.15 @@ -21,6 +21,10 @@
1.16 #include <fbs.h>
1.17 #include <bitbase.h>
1.18
1.19 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1.20 +#include <bitgdi/bitgcextradata.h>
1.21 +#endif
1.22 +
1.23 // For use when testing the code, allows the fast blending to be disabled so back to back comparisons
1.24 // can done be to check either timing or exact output.
1.25 //#define __ALLOW_FAST_BLEND_DISABLE__
1.26 @@ -230,49 +234,13 @@
1.27 };
1.28
1.29 class CFbsDevice;
1.30 +class CFbsDrawDevice;
1.31 class TOpenFontCharMetrics;
1.32 class CGraphicsAccelerator;
1.33 class CWsBitmap;
1.34 class MFastBlend;
1.35 -
1.36 -/**
1.37 -Class used to extend the CFbsBitGc class to avoid BC break. Any data member which needs
1.38 -to be added in CFbsBitGc should be added to this class.
1.39 -@internalAll
1.40 -@released
1.41 -*/
1.42 -class CFbsBitGcExtraData:public CBase
1.43 - {
1.44 -public:
1.45 - CFbsBitGcExtraData();
1.46 - ~CFbsBitGcExtraData();
1.47 - void Reset();
1.48 - inline TInt* PenArray(){return iPenArray;};
1.49 - inline TRgb ShadowColor(){return iShadowColor;}
1.50 - inline void SetPenArray(TInt* aPenArray);
1.51 - inline void SetShadowColor(const TRgb& aShadowColor);
1.52 - inline void ResetPenArray();
1.53 -private:
1.54 - TInt* iPenArray;
1.55 - TRgb iShadowColor;
1.56 - };
1.57 -
1.58 -inline void CFbsBitGcExtraData::SetPenArray(TInt* aPenArray)
1.59 - {
1.60 - delete[] iPenArray;
1.61 - iPenArray = aPenArray;
1.62 - }
1.63 -
1.64 -inline void CFbsBitGcExtraData::SetShadowColor(const TRgb& aShadowColor)
1.65 - {
1.66 - iShadowColor = aShadowColor;
1.67 - }
1.68 -
1.69 -inline void CFbsBitGcExtraData::ResetPenArray()
1.70 - {
1.71 - delete[] iPenArray;
1.72 - iPenArray = NULL;
1.73 - }
1.74 +class CFbsRasterizer;
1.75 +class CFbsBitGcExtraData;
1.76
1.77 /**
1.78 Concrete implementation of a bitmapped graphics context.
1.79 @@ -414,6 +382,19 @@
1.80 IMPORT_C TRgb BrushColor();
1.81 IMPORT_C TRgb PenColor();
1.82 IMPORT_C void ChangeDevice(CFbsDevice* aDevice);
1.83 + // New DrawText API's that take in extra paramemters such as context. Extensible.
1.84 + IMPORT_C void DrawText(const TDesC& aText,const TTextParameters* aParam);
1.85 + IMPORT_C void DrawText(const TDesC& aText,const TTextParameters* aParam,const TPoint& aPosition);
1.86 + IMPORT_C void DrawText(const TDesC& aText,const TTextParameters* aParam,const TRect& aBox);
1.87 + IMPORT_C void DrawText(const TDesC& aText,const TTextParameters* aParam,const TRect& aBox,TInt aBaselineOffset,TTextAlign aHrz=ELeft,TInt aMargin=0);
1.88 + IMPORT_C void DrawText(const TDesC& aText,const TTextParameters* aParam,const TRect& aBox,TInt aBaselineOffset,TInt aTextWidth,TTextAlign aHrz=ELeft,TInt aMargin=0);
1.89 + IMPORT_C void DrawTextVertical(const TDesC& aText,const TTextParameters* aParam,TBool aUp);
1.90 + IMPORT_C void DrawTextVertical(const TDesC& aText,const TTextParameters* aParam,const TPoint& aPosition,TBool aUp);
1.91 + IMPORT_C void DrawTextVertical(const TDesC& aText,const TTextParameters* aParam,const TRect& aBox,TBool aUp);
1.92 + IMPORT_C void DrawTextVertical(const TDesC& aText,const TTextParameters* aParam,const TRect& aBox,TInt aBaselineOffset,TBool aUp,TTextAlign aVert=ELeft,TInt aMargin=0);
1.93 + IMPORT_C void DrawTextVertical(const TDesC& aText,const TTextParameters* aParam,const TRect& aBox,TInt aBaselineOffset,TInt aTextWidth,TBool aUp,TTextAlign aVert=ELeft,TInt aMargin=0);
1.94 + IMPORT_C void UpdateJustification(const TDesC& aText,const TTextParameters* aParam);
1.95 + IMPORT_C void UpdateJustificationVertical(const TDesC& aText,const TTextParameters* aParam,TBool aUp);
1.96 private:
1.97 CFbsBitGc();
1.98 void AddRect(const TRect& aRect);
1.99 @@ -425,7 +406,7 @@
1.100 void ClipFillLine(TPoint,TPoint);
1.101 void CopyCharWord(TUint32* aBinaryDataPtr,const TUint8* aData,TInt aBitShift);
1.102 void CopyCharLine(TUint32* aBinaryDataPtr,TInt aBufferWords,const TUint8* aData,TInt aBitShift,TInt aCharWidth);
1.103 - void DrawText(const TDesC& aText,const TPoint& aPosition,TTextAlign aAlignment,
1.104 + void DrawText(const TDesC& aText,const TTextParameters* aParam,const TPoint& aPosition,TTextAlign aAlignment,
1.105 CFont::TTextDirection aDirection,const TRect* aBox = NULL);
1.106 void DoBitBlt(const TPoint& aDest,CFbsDevice* aDevice,const TRect& aSourceRect);
1.107 void DoBitBlt(const TPoint& aDest,CBitwiseBitmap* aBitmap,TUint32* aBase,TInt aStride,const TRect& aSourceRect);
1.108 @@ -434,7 +415,10 @@
1.109 void DoBitBltMaskedNonFlicker(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,TBool aInvertMask,const TPoint& aDitherOrigin,TInt aShadowMode);
1.110 void DoBitBltMaskedNonFlickerSolid(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,TBool aInvertMask,const TPoint& aDitherOrigin,TInt aShadowMode);
1.111 void DoBitBltMaskedNonFlickerPatterned(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,TBool aInvertMask,const TPoint& aDitherOrigin,TInt aShadowMode);
1.112 - void DoBitBltAlpha(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,const TPoint& aDitherOrigin,TInt aShadowMode, TBool aInvertMask);
1.113 + void DoBitBltAlpha(const TPoint& aDest, CBitwiseBitmap* aSourceBitmap,
1.114 + TUint32* aSourceBase, const TRect& aSourceRect,
1.115 + CBitwiseBitmap* aMaskBitmap, TUint32* aMaskBase,
1.116 + const TPoint& aAlphaPoint, TInt aShadowMode, TBool aInvertMask);
1.117 void DoBitBltAlpha(const TPoint& aDestPt,
1.118 const CBitwiseBitmap* aSrcBmp1,
1.119 TUint32* aSrcBmpDataAddr1,
1.120 @@ -452,23 +436,23 @@
1.121 void DoDrawLine(TPoint aStart,TPoint aEnd,TBool aDrawStartPoint);
1.122 void DoDrawDottedWideLine(const TPoint& pt1,const TPoint& pt2,TBool drawstart,const TRect& screenrect);
1.123 void DoDrawSolidWideLine(const TPoint& pt1,const TPoint& pt2,TBool drawstart,const TRect& screenrect);
1.124 - void DoDrawText(CFont::TPositionParam& aParam);
1.125 + void DoDrawText(CFont::TPositionParam& aParam,const TInt aEnd);
1.126 void DoDrawCharacter(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData);
1.127 - void DoDrawTextEx(CFont::TPositionParam& aParam,const CBitmapFont* font);
1.128 + void DoDrawTextEx(CFont::TPositionParam& aParam,const CBitmapFont* font,const TInt aEnd, const TInt aUnderlineStrikethroughOffset);
1.129 void DoDrawCharacterEx(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
1.130 TBool aBold,TBool aItalic,TInt aSemiAscent);
1.131 - void DoDrawCharacterAntiAliased(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData);
1.132 - void DoDrawTextLarge(CFont::TPositionParam& aParam,const CBitmapFont* font);
1.133 + void DoDrawCharacterAntiAliased(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData, const TGlyphBitmapType aGlyphType);
1.134 + void DoDrawTextLarge(CFont::TPositionParam& aParam,const CBitmapFont* font,const TInt aEnd);
1.135 void DoDrawCharacterLarge(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
1.136 TBool aBold,TBool aItalic,TInt aSemiAscent,TInt aWidthFactor,TInt aHeightFactor);
1.137 void DoDrawCharacterExLarge(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
1.138 TBool aBold,TBool aItalic,TInt aSemiAscent,TInt aWidthFactor,TInt aHeightFactor);
1.139 void DoDrawCharacterMultiplied(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
1.140 TBool aBold,TBool aItalic,TInt aSemiAscent,TInt aWidthMultiplier,TInt aHeightMultiplier);
1.141 - void DoDrawTextVertical(CFont::TPositionParam& aParam,const CBitmapFont* font,TBool aUp);
1.142 + void DoDrawTextVertical(CFont::TPositionParam& aParam,const CBitmapFont* font,TBool aUp,const TInt aEnd);
1.143 void DoDrawCharacterVertical(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
1.144 TBool aBold,TBool aItalic,TInt aSemiAscent,TInt aWidthFactor,TInt aHeightFactor,TBool aUp);
1.145 - void DoDrawCharacterVerticalAntiAliased(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,TBool aUp);
1.146 + void DoDrawCharacterVerticalAntiAliased(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,TBool aUp, TGlyphBitmapType aGlyphBitmapType);
1.147 void DoPlot(const TPoint& pt);
1.148 void EllipseFill(const TRect& aRect);
1.149 void EllipseOutline(const TRect& aRect);
1.150 @@ -507,6 +491,11 @@
1.151 TInt APIExGetShadowColor(TAny*& aShadowColor);
1.152 TInt FastBlendInterface(const CBitwiseBitmap* aSource, const CBitwiseBitmap* aMask, MFastBlend*& aFastBlend) const;
1.153 TInt APIExIsFbsBitGc(TAny*& aIsCFbsBitGc);
1.154 + TDisplayMode ScanLineBufferDisplayMode(CFbsDrawDevice* aDrawDevice);
1.155 + TInt BaselineCorrection();
1.156 + CFbsRasterizer* PrepareRasterizerForExtendedBitmap(const CFbsBitmap& aBitmap);
1.157 + CFbsRasterizer* PrepareRasterizerForExtendedBitmap(const CFbsBitmap& aBitmap, const TRect& aDestRect, const TPoint& aOffset);
1.158 + CFbsRasterizer* PrepareRasterizerForExtendedBitmap(const CFbsBitmap& aBitmap, const TRect& aDestRect, const TRect& aSourceRect);
1.159 protected:
1.160 /** This function should not be used by externals but must retain the
1.161 same ordinal number to maintain BC, thus is exported.*/
1.162 @@ -574,3 +563,4 @@
1.163 {SetFadingParameters(aBlackMap,255);} //255 is the value of white map when not fading
1.164
1.165 #endif
1.166 +