os/graphics/printingservices/printerdriversupport/tps/DUMMY.H
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#include <gdi.h>
sl@0
    17
sl@0
    18
class CDummyDevice : public	CGraphicsDevice
sl@0
    19
	{
sl@0
    20
protected:
sl@0
    21
	CDummyDevice();
sl@0
    22
public:
sl@0
    23
	IMPORT_C static CDummyDevice* NewL();
sl@0
    24
	IMPORT_C ~CDummyDevice();
sl@0
    25
	IMPORT_C TInt HorizontalTwipsToPixels(TInt aTwips) const;
sl@0
    26
	IMPORT_C TInt VerticalTwipsToPixels(TInt aTwips) const;
sl@0
    27
	IMPORT_C TInt HorizontalPixelsToTwips(TInt aPixels) const;
sl@0
    28
	IMPORT_C TInt VerticalPixelsToTwips(TInt aPixels) const;
sl@0
    29
	IMPORT_C TInt GetNearestFontInTwips(CFont*& aFont,const TFontSpec& aFontSpec);
sl@0
    30
	IMPORT_C TInt GetNearestFontToDesignHeightInTwips(CFont*& aFont,const TFontSpec& aFontSpec);
sl@0
    31
	IMPORT_C void ReleaseFont(CFont* aFont);
sl@0
    32
	IMPORT_C TDisplayMode DisplayMode() const;
sl@0
    33
	IMPORT_C TSize SizeInPixels() const;
sl@0
    34
	IMPORT_C TSize SizeInTwips() const;
sl@0
    35
    IMPORT_C TInt CreateContext(CGraphicsContext*& aGC);
sl@0
    36
    IMPORT_C TInt NumTypefaces() const;
sl@0
    37
    IMPORT_C void TypefaceSupport(TTypefaceSupport& aTypefaceSupport,TInt aTypefaceIndex) const;
sl@0
    38
	IMPORT_C TInt FontHeightInTwips(TInt aTypefaceIndex,TInt aHeightIndex) const;
sl@0
    39
	IMPORT_C void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const;
sl@0
    40
	IMPORT_C void SetPalette(CPalette* aPalette);
sl@0
    41
	IMPORT_C TInt GetPalette(CPalette*& aPalette) const;
sl@0
    42
public:
sl@0
    43
	CConsoleBase* iConsole;
sl@0
    44
	};
sl@0
    45
sl@0
    46
class CDummyGc : public	CGraphicsContext
sl@0
    47
	{
sl@0
    48
public:
sl@0
    49
	IMPORT_C CDummyGc(CDummyDevice* aDevice);
sl@0
    50
	IMPORT_C ~CDummyGc();
sl@0
    51
	IMPORT_C CGraphicsDevice* Device() const;
sl@0
    52
	IMPORT_C void SetOrigin(const TPoint& aPos=TPoint(0,0));
sl@0
    53
	IMPORT_C void SetDrawMode(TDrawMode aDrawingMode);
sl@0
    54
	IMPORT_C void SetClippingRect(const TRect& aRect);
sl@0
    55
	IMPORT_C void CancelClippingRect();
sl@0
    56
	IMPORT_C void Reset();
sl@0
    57
sl@0
    58
	IMPORT_C void UseFont(const CFont* aFont);
sl@0
    59
	IMPORT_C void DiscardFont();
sl@0
    60
	IMPORT_C void SetUnderlineStyle(TFontUnderline aUnderlineStyle);
sl@0
    61
	IMPORT_C void SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle);
sl@0
    62
	IMPORT_C void SetWordJustification(TInt aExcessWidth,TInt aNumGaps);
sl@0
    63
	IMPORT_C void SetCharJustification(TInt aExcessWidth,TInt aNumChars);
sl@0
    64
sl@0
    65
	IMPORT_C void SetPenColor(const TRgb& aColor);
sl@0
    66
	IMPORT_C void SetPenStyle(TPenStyle aPenStyle);
sl@0
    67
	IMPORT_C void SetPenSize(const TSize& aSize);
sl@0
    68
sl@0
    69
	IMPORT_C void SetBrushColor(const TRgb& aColor);
sl@0
    70
	IMPORT_C void SetBrushStyle(TBrushStyle aBrushStyle);
sl@0
    71
	IMPORT_C void SetBrushOrigin(const TPoint& aOrigin);
sl@0
    72
	IMPORT_C void UseBrushPattern(const CFbsBitmap* aBitmap);
sl@0
    73
	IMPORT_C void DiscardBrushPattern();
sl@0
    74
	IMPORT_C void MoveTo(const TPoint& aPoint);
sl@0
    75
	IMPORT_C void MoveBy(const TPoint& aVector);
sl@0
    76
	IMPORT_C void Plot(const TPoint& aPoint);
sl@0
    77
	IMPORT_C void DrawArc(const TRect& aRect,const TPoint& aStart,const TPoint& aEnd);
sl@0
    78
	IMPORT_C void DrawLine(const TPoint& aPoint1,const TPoint& aPoint2);
sl@0
    79
	IMPORT_C void DrawLineTo(const TPoint& aPoint);
sl@0
    80
	IMPORT_C void DrawLineBy(const TPoint& aVector);
sl@0
    81
	IMPORT_C void DrawPolyLine(const CArrayFix<TPoint>* aPointList);
sl@0
    82
	IMPORT_C void DrawPolyLine(const TPoint* aPointList,TInt aNumPoints);
sl@0
    83
	IMPORT_C void DrawPie(const TRect& aRect,const TPoint& aStart,const TPoint& aEnd);
sl@0
    84
	IMPORT_C void DrawEllipse(const TRect& aRect);
sl@0
    85
	IMPORT_C void DrawRect(const TRect& aRect);
sl@0
    86
	IMPORT_C void DrawRoundRect(const TRect& aRect,const TSize& aCornerSize);
sl@0
    87
	IMPORT_C TInt DrawPolygon(const CArrayFix<TPoint>* aPointList,TFillRule aFillRule=EAlternate);
sl@0
    88
	IMPORT_C TInt DrawPolygon(const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule=EAlternate);
sl@0
    89
	IMPORT_C void DrawBitmap(const TPoint& aTopLeft,const CFbsBitmap* aSource);
sl@0
    90
	IMPORT_C void DrawBitmap(const TRect& aDestRect,const CFbsBitmap* aSource);
sl@0
    91
	IMPORT_C void DrawBitmap(const TRect& aDestRect,const CFbsBitmap* aSource,const TRect& aSourceRect);
sl@0
    92
	IMPORT_C void DrawBitmapMasked(const TRect& aDestRect,const CFbsBitmap* aBitmap,const TRect& aSourceRect,const CFbsBitmap* aMaskBitmap,TBool aInvertMask);
sl@0
    93
	IMPORT_C void DrawBitmapMasked(const TRect& aDestRect,const CWsBitmap* aBitmap,const TRect& aSourceRect,const CWsBitmap* aMaskBitmap,TBool aInvertMask);
sl@0
    94
	IMPORT_C void DrawText(const TDesC& aString,const TPoint& aPosition);
sl@0
    95
	IMPORT_C void DrawText(const TDesC& aString,const TRect& aBox,TInt aBaselineOffset,TTextAlign aHoriz=ELeft,TInt aLeftMrg=0);
sl@0
    96
sl@0
    97
protected:
sl@0
    98
	CDummyDevice* iDevice;
sl@0
    99
	};
sl@0
   100