epoc32/include/gulgcmap.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2001-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #if !defined(__GULGCMAP_H__)
    17 #define __GULGCMAP_H__
    18 
    19 #include <w32std.h>
    20 
    21 
    22 class CWindowToBitmapMappingGc : public CWindowGc
    23 /**
    24 @publishedPartner
    25 @released 
    26 */
    27 	{
    28 public:
    29 	IMPORT_C static CWindowToBitmapMappingGc* NewL(CWsScreenDevice& aDevice,CFbsBitGc& aFbsBitGc);
    30 	IMPORT_C virtual ~CWindowToBitmapMappingGc();
    31 //====================FROM CGraphicsContext.H===============================
    32 	IMPORT_C virtual CGraphicsDevice* Device() const;
    33 	IMPORT_C virtual void Activate(RDrawableWindow &aWindow);
    34 	IMPORT_C virtual void Deactivate();
    35 	IMPORT_C virtual void SetOrigin(const TPoint &aPos=TPoint(0,0));
    36 	IMPORT_C virtual void SetDrawMode(TDrawMode aDrawingMode);
    37 	IMPORT_C virtual void SetClippingRect(const TRect& aRect);
    38 	IMPORT_C virtual void CancelClippingRect();
    39 	IMPORT_C virtual void Reset();
    40 
    41 	IMPORT_C virtual void UseFont(const CFont *aFont);
    42 	IMPORT_C virtual void DiscardFont();
    43 	IMPORT_C virtual void SetUnderlineStyle(TFontUnderline aUnderlineStyle);
    44 	IMPORT_C virtual void SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle);
    45 // Used to do justified text properly
    46 	IMPORT_C virtual void SetWordJustification(TInt aExcessWidth,TInt aNumGaps);
    47 // Used primarily to get accurate WYSIWYG
    48 	IMPORT_C virtual void SetCharJustification(TInt aExcessWidth,TInt aNumChars);
    49 
    50 	IMPORT_C virtual void SetPenColor(const TRgb &aColor);
    51 	IMPORT_C virtual void SetPenStyle(TPenStyle aPenStyle);
    52 	IMPORT_C virtual void SetPenSize(const TSize& aSize);
    53 
    54 	IMPORT_C virtual void SetBrushColor(const TRgb &aColor);
    55 	IMPORT_C virtual void SetBrushStyle(TBrushStyle aBrushStyle);
    56 	IMPORT_C virtual void SetBrushOrigin(const TPoint &aOrigin);
    57 	IMPORT_C virtual void UseBrushPattern(const CFbsBitmap *aBitmap);
    58 	IMPORT_C virtual void DiscardBrushPattern();
    59 //
    60 // Move the internal position, as used by DrawLineTo & DrawLineBy, and set by MoveTo,
    61 // MoveBy, DrawLine, DrawLineTo, DrawLineBy and DrawPolyline
    62 	IMPORT_C virtual void MoveTo(const TPoint &aPoint);
    63 	IMPORT_C virtual void MoveBy(const TPoint &aVector);
    64 	IMPORT_C virtual void Plot(const TPoint &aPoint);
    65 //
    66 //  Line drawing subject to pen color, width and style and draw mode
    67 	IMPORT_C virtual void DrawArc(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd);
    68 	IMPORT_C virtual void DrawLine(const TPoint &aPoint1,const TPoint &aPoint2);
    69 	IMPORT_C virtual void DrawLineTo(const TPoint &aPoint);
    70 	IMPORT_C virtual void DrawLineBy(const TPoint &aVector);
    71 	IMPORT_C virtual void DrawPolyLine(const CArrayFix<TPoint> *aPointList);
    72 	IMPORT_C virtual void DrawPolyLine(const TPoint* aPointList,TInt aNumPoints);
    73 //
    74 // Filled outlines
    75 // Outlines subject to pen color, width and style and draw mode
    76 // (set pen to ENullPen for no outline)
    77 // Fill subject to brush style (color, hash or pattern) and origin and
    78 // drawing mode (set brush to ENullBrush for no fill)
    79 	IMPORT_C virtual void DrawPie(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd);
    80 	IMPORT_C virtual void DrawEllipse(const TRect &aRect);
    81 	IMPORT_C virtual void DrawRect(const TRect &aRect);
    82 	IMPORT_C virtual void DrawRoundRect(const TRect &aRect,const TSize &aEllipse);
    83 	IMPORT_C virtual TInt DrawPolygon(const CArrayFix<TPoint> *aPointList,TFillRule aFillRule=EAlternate);
    84 	IMPORT_C virtual TInt DrawPolygon(const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule=EAlternate);
    85 //
    86 // Uses the bitmap's Twips size and does a "stretch" blit in general
    87 	IMPORT_C virtual void DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aSource);
    88 	IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource);
    89 	IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource, const TRect &aSourceRect);
    90 	IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CFbsBitmap* aBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap, TBool aInvertMask);
    91 	IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CWsBitmap* aBitmap, const TRect& aSourceRect, const CWsBitmap* aMaskBitmap, TBool aInvertMask);
    92 
    93 //
    94 // Text drawing subject to drawing mode
    95 // Subject to used font, pen color, drawing mode, 
    96 // word and char justification
    97 	IMPORT_C virtual void DrawText(const TDesC &aString,const TPoint &aPosition);
    98 //
    99 // Subject to same as above plus brush for background
   100 // (set brush to ENullBrush for no effect on background)
   101 	IMPORT_C virtual void DrawText(const TDesC &aString,const TRect &aBox,TInt aBaselineOffset,TTextAlign aHoriz=ELeft,TInt aLeftMrg=0);
   102 //================Extra functions from CBitmapContext==============
   103 	IMPORT_C virtual void Clear();
   104 	IMPORT_C virtual void Clear(const TRect &aRect);
   105 	IMPORT_C virtual void CopyRect(const TPoint &aOffset,const TRect &aRect);
   106 	IMPORT_C virtual void BitBlt(const TPoint &aPos, const CFbsBitmap *aDevice);
   107 	IMPORT_C virtual void BitBlt(const TPoint &aPos, const CFbsBitmap *aDevice, const TRect &aRect);
   108 	IMPORT_C virtual void BitBltMasked(const TPoint& aPoint,const CFbsBitmap* aBitmap,const TRect& aSourceRect,const CFbsBitmap* aMaskBitmap,TBool aInvertMask);
   109 	IMPORT_C virtual void BitBlt(const TPoint &aPos, const CWsBitmap *aDevice);
   110 	IMPORT_C virtual void BitBlt(const TPoint &aPos, const CWsBitmap *aDevice, const TRect &aRect);
   111 	IMPORT_C virtual void BitBltMasked(const TPoint& aPoint,const CWsBitmap *aBitmap,const TRect& aSourceRect,const CWsBitmap *aMaskBitmap,TBool aInvertMask);
   112 	IMPORT_C virtual void MapColors(const TRect& aRect,const TRgb* aColors,TInt aNumPairs=2,TBool aMapForwards=ETrue);
   113 
   114 	IMPORT_C virtual void DrawTextVertical(const TDesC& aText,const TPoint& aPosition,TBool aUp);
   115 	IMPORT_C virtual void DrawTextVertical(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TBool aUp,TTextAlign aVert=ELeft,TInt aMargin=0);
   116 //=================Extra functions specific to wserv GDI==============
   117 	IMPORT_C virtual void SetDitherOrigin(const TPoint& aPoint);
   118 	IMPORT_C virtual TInt SetClippingRegion(const TRegion &aClippingRegion);
   119 	IMPORT_C virtual void CancelClippingRegion();
   120 	IMPORT_C virtual void SetOpaque(TBool aDrawOpaque=ETrue);
   121 //=================Functions also supplied by CFbsBitGc==============
   122 	IMPORT_C void SetFaded(TBool aFaded);
   123 	IMPORT_C void SetFadingParameters(TUint8 aBlackMap,TUint8 aWhiteMap);
   124 	IMPORT_C TInt AlphaBlendBitmaps(const TPoint& aDestPt, const CFbsBitmap* aSrcBmp, const TRect& aSrcRect, const CFbsBitmap* aAlphaBmp, const TPoint& aAlphaPt);	
   125 	IMPORT_C TInt AlphaBlendBitmaps(const TPoint& aDestPt, const CWsBitmap* aSrcBmp,	const TRect& aSrcRect, const CWsBitmap* aAlphaBmp, const TPoint& aAlphaPt);
   126 
   127 ////=============================================================
   128 protected:
   129 	IMPORT_C CWindowToBitmapMappingGc(CWsScreenDevice& aDevice,CFbsBitGc& aFbsBitGc);
   130 	
   131 private:
   132 	CFbsBitGc& iFbsBitGc;	// not owned by this class
   133 	};
   134 
   135 #endif