epoc32/include/gulgcmap.h
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/gulgcmap.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,135 @@
     1.4 +// Copyright (c) 2001-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 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#if !defined(__GULGCMAP_H__)
    1.20 +#define __GULGCMAP_H__
    1.21 +
    1.22 +#include <w32std.h>
    1.23 +
    1.24 +
    1.25 +class CWindowToBitmapMappingGc : public CWindowGc
    1.26 +/**
    1.27 +@publishedPartner
    1.28 +@released 
    1.29 +*/
    1.30 +	{
    1.31 +public:
    1.32 +	IMPORT_C static CWindowToBitmapMappingGc* NewL(CWsScreenDevice& aDevice,CFbsBitGc& aFbsBitGc);
    1.33 +	IMPORT_C virtual ~CWindowToBitmapMappingGc();
    1.34 +//====================FROM CGraphicsContext.H===============================
    1.35 +	IMPORT_C virtual CGraphicsDevice* Device() const;
    1.36 +	IMPORT_C virtual void Activate(RDrawableWindow &aWindow);
    1.37 +	IMPORT_C virtual void Deactivate();
    1.38 +	IMPORT_C virtual void SetOrigin(const TPoint &aPos=TPoint(0,0));
    1.39 +	IMPORT_C virtual void SetDrawMode(TDrawMode aDrawingMode);
    1.40 +	IMPORT_C virtual void SetClippingRect(const TRect& aRect);
    1.41 +	IMPORT_C virtual void CancelClippingRect();
    1.42 +	IMPORT_C virtual void Reset();
    1.43 +
    1.44 +	IMPORT_C virtual void UseFont(const CFont *aFont);
    1.45 +	IMPORT_C virtual void DiscardFont();
    1.46 +	IMPORT_C virtual void SetUnderlineStyle(TFontUnderline aUnderlineStyle);
    1.47 +	IMPORT_C virtual void SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle);
    1.48 +// Used to do justified text properly
    1.49 +	IMPORT_C virtual void SetWordJustification(TInt aExcessWidth,TInt aNumGaps);
    1.50 +// Used primarily to get accurate WYSIWYG
    1.51 +	IMPORT_C virtual void SetCharJustification(TInt aExcessWidth,TInt aNumChars);
    1.52 +
    1.53 +	IMPORT_C virtual void SetPenColor(const TRgb &aColor);
    1.54 +	IMPORT_C virtual void SetPenStyle(TPenStyle aPenStyle);
    1.55 +	IMPORT_C virtual void SetPenSize(const TSize& aSize);
    1.56 +
    1.57 +	IMPORT_C virtual void SetBrushColor(const TRgb &aColor);
    1.58 +	IMPORT_C virtual void SetBrushStyle(TBrushStyle aBrushStyle);
    1.59 +	IMPORT_C virtual void SetBrushOrigin(const TPoint &aOrigin);
    1.60 +	IMPORT_C virtual void UseBrushPattern(const CFbsBitmap *aBitmap);
    1.61 +	IMPORT_C virtual void DiscardBrushPattern();
    1.62 +//
    1.63 +// Move the internal position, as used by DrawLineTo & DrawLineBy, and set by MoveTo,
    1.64 +// MoveBy, DrawLine, DrawLineTo, DrawLineBy and DrawPolyline
    1.65 +	IMPORT_C virtual void MoveTo(const TPoint &aPoint);
    1.66 +	IMPORT_C virtual void MoveBy(const TPoint &aVector);
    1.67 +	IMPORT_C virtual void Plot(const TPoint &aPoint);
    1.68 +//
    1.69 +//  Line drawing subject to pen color, width and style and draw mode
    1.70 +	IMPORT_C virtual void DrawArc(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd);
    1.71 +	IMPORT_C virtual void DrawLine(const TPoint &aPoint1,const TPoint &aPoint2);
    1.72 +	IMPORT_C virtual void DrawLineTo(const TPoint &aPoint);
    1.73 +	IMPORT_C virtual void DrawLineBy(const TPoint &aVector);
    1.74 +	IMPORT_C virtual void DrawPolyLine(const CArrayFix<TPoint> *aPointList);
    1.75 +	IMPORT_C virtual void DrawPolyLine(const TPoint* aPointList,TInt aNumPoints);
    1.76 +//
    1.77 +// Filled outlines
    1.78 +// Outlines subject to pen color, width and style and draw mode
    1.79 +// (set pen to ENullPen for no outline)
    1.80 +// Fill subject to brush style (color, hash or pattern) and origin and
    1.81 +// drawing mode (set brush to ENullBrush for no fill)
    1.82 +	IMPORT_C virtual void DrawPie(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd);
    1.83 +	IMPORT_C virtual void DrawEllipse(const TRect &aRect);
    1.84 +	IMPORT_C virtual void DrawRect(const TRect &aRect);
    1.85 +	IMPORT_C virtual void DrawRoundRect(const TRect &aRect,const TSize &aEllipse);
    1.86 +	IMPORT_C virtual TInt DrawPolygon(const CArrayFix<TPoint> *aPointList,TFillRule aFillRule=EAlternate);
    1.87 +	IMPORT_C virtual TInt DrawPolygon(const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule=EAlternate);
    1.88 +//
    1.89 +// Uses the bitmap's Twips size and does a "stretch" blit in general
    1.90 +	IMPORT_C virtual void DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aSource);
    1.91 +	IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource);
    1.92 +	IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource, const TRect &aSourceRect);
    1.93 +	IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CFbsBitmap* aBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap, TBool aInvertMask);
    1.94 +	IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CWsBitmap* aBitmap, const TRect& aSourceRect, const CWsBitmap* aMaskBitmap, TBool aInvertMask);
    1.95 +
    1.96 +//
    1.97 +// Text drawing subject to drawing mode
    1.98 +// Subject to used font, pen color, drawing mode, 
    1.99 +// word and char justification
   1.100 +	IMPORT_C virtual void DrawText(const TDesC &aString,const TPoint &aPosition);
   1.101 +//
   1.102 +// Subject to same as above plus brush for background
   1.103 +// (set brush to ENullBrush for no effect on background)
   1.104 +	IMPORT_C virtual void DrawText(const TDesC &aString,const TRect &aBox,TInt aBaselineOffset,TTextAlign aHoriz=ELeft,TInt aLeftMrg=0);
   1.105 +//================Extra functions from CBitmapContext==============
   1.106 +	IMPORT_C virtual void Clear();
   1.107 +	IMPORT_C virtual void Clear(const TRect &aRect);
   1.108 +	IMPORT_C virtual void CopyRect(const TPoint &aOffset,const TRect &aRect);
   1.109 +	IMPORT_C virtual void BitBlt(const TPoint &aPos, const CFbsBitmap *aDevice);
   1.110 +	IMPORT_C virtual void BitBlt(const TPoint &aPos, const CFbsBitmap *aDevice, const TRect &aRect);
   1.111 +	IMPORT_C virtual void BitBltMasked(const TPoint& aPoint,const CFbsBitmap* aBitmap,const TRect& aSourceRect,const CFbsBitmap* aMaskBitmap,TBool aInvertMask);
   1.112 +	IMPORT_C virtual void BitBlt(const TPoint &aPos, const CWsBitmap *aDevice);
   1.113 +	IMPORT_C virtual void BitBlt(const TPoint &aPos, const CWsBitmap *aDevice, const TRect &aRect);
   1.114 +	IMPORT_C virtual void BitBltMasked(const TPoint& aPoint,const CWsBitmap *aBitmap,const TRect& aSourceRect,const CWsBitmap *aMaskBitmap,TBool aInvertMask);
   1.115 +	IMPORT_C virtual void MapColors(const TRect& aRect,const TRgb* aColors,TInt aNumPairs=2,TBool aMapForwards=ETrue);
   1.116 +
   1.117 +	IMPORT_C virtual void DrawTextVertical(const TDesC& aText,const TPoint& aPosition,TBool aUp);
   1.118 +	IMPORT_C virtual void DrawTextVertical(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TBool aUp,TTextAlign aVert=ELeft,TInt aMargin=0);
   1.119 +//=================Extra functions specific to wserv GDI==============
   1.120 +	IMPORT_C virtual void SetDitherOrigin(const TPoint& aPoint);
   1.121 +	IMPORT_C virtual TInt SetClippingRegion(const TRegion &aClippingRegion);
   1.122 +	IMPORT_C virtual void CancelClippingRegion();
   1.123 +	IMPORT_C virtual void SetOpaque(TBool aDrawOpaque=ETrue);
   1.124 +//=================Functions also supplied by CFbsBitGc==============
   1.125 +	IMPORT_C void SetFaded(TBool aFaded);
   1.126 +	IMPORT_C void SetFadingParameters(TUint8 aBlackMap,TUint8 aWhiteMap);
   1.127 +	IMPORT_C TInt AlphaBlendBitmaps(const TPoint& aDestPt, const CFbsBitmap* aSrcBmp, const TRect& aSrcRect, const CFbsBitmap* aAlphaBmp, const TPoint& aAlphaPt);	
   1.128 +	IMPORT_C TInt AlphaBlendBitmaps(const TPoint& aDestPt, const CWsBitmap* aSrcBmp,	const TRect& aSrcRect, const CWsBitmap* aAlphaBmp, const TPoint& aAlphaPt);
   1.129 +
   1.130 +////=============================================================
   1.131 +protected:
   1.132 +	IMPORT_C CWindowToBitmapMappingGc(CWsScreenDevice& aDevice,CFbsBitGc& aFbsBitGc);
   1.133 +	
   1.134 +private:
   1.135 +	CFbsBitGc& iFbsBitGc;	// not owned by this class
   1.136 +	};
   1.137 +
   1.138 +#endif