os/graphics/printingservices/printerdriversupport/tps/DUMMY.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/printingservices/printerdriversupport/tps/DUMMY.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,100 @@
     1.4 +// Copyright (c) 1996-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 "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.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 +#include <gdi.h>
    1.20 +
    1.21 +class CDummyDevice : public	CGraphicsDevice
    1.22 +	{
    1.23 +protected:
    1.24 +	CDummyDevice();
    1.25 +public:
    1.26 +	IMPORT_C static CDummyDevice* NewL();
    1.27 +	IMPORT_C ~CDummyDevice();
    1.28 +	IMPORT_C TInt HorizontalTwipsToPixels(TInt aTwips) const;
    1.29 +	IMPORT_C TInt VerticalTwipsToPixels(TInt aTwips) const;
    1.30 +	IMPORT_C TInt HorizontalPixelsToTwips(TInt aPixels) const;
    1.31 +	IMPORT_C TInt VerticalPixelsToTwips(TInt aPixels) const;
    1.32 +	IMPORT_C TInt GetNearestFontInTwips(CFont*& aFont,const TFontSpec& aFontSpec);
    1.33 +	IMPORT_C TInt GetNearestFontToDesignHeightInTwips(CFont*& aFont,const TFontSpec& aFontSpec);
    1.34 +	IMPORT_C void ReleaseFont(CFont* aFont);
    1.35 +	IMPORT_C TDisplayMode DisplayMode() const;
    1.36 +	IMPORT_C TSize SizeInPixels() const;
    1.37 +	IMPORT_C TSize SizeInTwips() const;
    1.38 +    IMPORT_C TInt CreateContext(CGraphicsContext*& aGC);
    1.39 +    IMPORT_C TInt NumTypefaces() const;
    1.40 +    IMPORT_C void TypefaceSupport(TTypefaceSupport& aTypefaceSupport,TInt aTypefaceIndex) const;
    1.41 +	IMPORT_C TInt FontHeightInTwips(TInt aTypefaceIndex,TInt aHeightIndex) const;
    1.42 +	IMPORT_C void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const;
    1.43 +	IMPORT_C void SetPalette(CPalette* aPalette);
    1.44 +	IMPORT_C TInt GetPalette(CPalette*& aPalette) const;
    1.45 +public:
    1.46 +	CConsoleBase* iConsole;
    1.47 +	};
    1.48 +
    1.49 +class CDummyGc : public	CGraphicsContext
    1.50 +	{
    1.51 +public:
    1.52 +	IMPORT_C CDummyGc(CDummyDevice* aDevice);
    1.53 +	IMPORT_C ~CDummyGc();
    1.54 +	IMPORT_C CGraphicsDevice* Device() const;
    1.55 +	IMPORT_C void SetOrigin(const TPoint& aPos=TPoint(0,0));
    1.56 +	IMPORT_C void SetDrawMode(TDrawMode aDrawingMode);
    1.57 +	IMPORT_C void SetClippingRect(const TRect& aRect);
    1.58 +	IMPORT_C void CancelClippingRect();
    1.59 +	IMPORT_C void Reset();
    1.60 +
    1.61 +	IMPORT_C void UseFont(const CFont* aFont);
    1.62 +	IMPORT_C void DiscardFont();
    1.63 +	IMPORT_C void SetUnderlineStyle(TFontUnderline aUnderlineStyle);
    1.64 +	IMPORT_C void SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle);
    1.65 +	IMPORT_C void SetWordJustification(TInt aExcessWidth,TInt aNumGaps);
    1.66 +	IMPORT_C void SetCharJustification(TInt aExcessWidth,TInt aNumChars);
    1.67 +
    1.68 +	IMPORT_C void SetPenColor(const TRgb& aColor);
    1.69 +	IMPORT_C void SetPenStyle(TPenStyle aPenStyle);
    1.70 +	IMPORT_C void SetPenSize(const TSize& aSize);
    1.71 +
    1.72 +	IMPORT_C void SetBrushColor(const TRgb& aColor);
    1.73 +	IMPORT_C void SetBrushStyle(TBrushStyle aBrushStyle);
    1.74 +	IMPORT_C void SetBrushOrigin(const TPoint& aOrigin);
    1.75 +	IMPORT_C void UseBrushPattern(const CFbsBitmap* aBitmap);
    1.76 +	IMPORT_C void DiscardBrushPattern();
    1.77 +	IMPORT_C void MoveTo(const TPoint& aPoint);
    1.78 +	IMPORT_C void MoveBy(const TPoint& aVector);
    1.79 +	IMPORT_C void Plot(const TPoint& aPoint);
    1.80 +	IMPORT_C void DrawArc(const TRect& aRect,const TPoint& aStart,const TPoint& aEnd);
    1.81 +	IMPORT_C void DrawLine(const TPoint& aPoint1,const TPoint& aPoint2);
    1.82 +	IMPORT_C void DrawLineTo(const TPoint& aPoint);
    1.83 +	IMPORT_C void DrawLineBy(const TPoint& aVector);
    1.84 +	IMPORT_C void DrawPolyLine(const CArrayFix<TPoint>* aPointList);
    1.85 +	IMPORT_C void DrawPolyLine(const TPoint* aPointList,TInt aNumPoints);
    1.86 +	IMPORT_C void DrawPie(const TRect& aRect,const TPoint& aStart,const TPoint& aEnd);
    1.87 +	IMPORT_C void DrawEllipse(const TRect& aRect);
    1.88 +	IMPORT_C void DrawRect(const TRect& aRect);
    1.89 +	IMPORT_C void DrawRoundRect(const TRect& aRect,const TSize& aCornerSize);
    1.90 +	IMPORT_C TInt DrawPolygon(const CArrayFix<TPoint>* aPointList,TFillRule aFillRule=EAlternate);
    1.91 +	IMPORT_C TInt DrawPolygon(const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule=EAlternate);
    1.92 +	IMPORT_C void DrawBitmap(const TPoint& aTopLeft,const CFbsBitmap* aSource);
    1.93 +	IMPORT_C void DrawBitmap(const TRect& aDestRect,const CFbsBitmap* aSource);
    1.94 +	IMPORT_C void DrawBitmap(const TRect& aDestRect,const CFbsBitmap* aSource,const TRect& aSourceRect);
    1.95 +	IMPORT_C void DrawBitmapMasked(const TRect& aDestRect,const CFbsBitmap* aBitmap,const TRect& aSourceRect,const CFbsBitmap* aMaskBitmap,TBool aInvertMask);
    1.96 +	IMPORT_C void DrawBitmapMasked(const TRect& aDestRect,const CWsBitmap* aBitmap,const TRect& aSourceRect,const CWsBitmap* aMaskBitmap,TBool aInvertMask);
    1.97 +	IMPORT_C void DrawText(const TDesC& aString,const TPoint& aPosition);
    1.98 +	IMPORT_C void DrawText(const TDesC& aString,const TRect& aBox,TInt aBaselineOffset,TTextAlign aHoriz=ELeft,TInt aLeftMrg=0);
    1.99 +
   1.100 +protected:
   1.101 +	CDummyDevice* iDevice;
   1.102 +	};
   1.103 +