LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/vcl - outdev.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 51 53 96.2 %
Date: 2012-08-25 Functions: 46 48 95.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 7 10 70.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _SV_OUTDEV_HXX
      30                 :            : #define _SV_OUTDEV_HXX
      31                 :            : 
      32                 :            : #include <tools/gen.hxx>
      33                 :            : #include <tools/string.hxx>
      34                 :            : #include <tools/solar.h>
      35                 :            : #include <vcl/dllapi.h>
      36                 :            : #include <tools/rc.hxx>
      37                 :            : #include <tools/color.hxx>
      38                 :            : #include <vcl/font.hxx>
      39                 :            : #include <vcl/region.hxx>
      40                 :            : #include <vcl/mapmod.hxx>
      41                 :            : #include <vcl/wall.hxx>
      42                 :            : #include <vcl/settings.hxx>
      43                 :            : #include <vcl/salnativewidgets.hxx>
      44                 :            : #include <tools/poly.hxx>
      45                 :            : #include <basegfx/vector/b2enums.hxx>
      46                 :            : #include <com/sun/star/uno/Reference.h>
      47                 :            : #include <unotools/fontdefs.hxx>
      48                 :            : 
      49                 :            : #include <vector>
      50                 :            : 
      51                 :            : struct ImplOutDevData;
      52                 :            : class ImplFontEntry;
      53                 :            : struct ImplObjStack;
      54                 :            : struct ImplKernPairData;
      55                 :            : struct SystemGraphicsData;
      56                 :            : struct SystemFontData;
      57                 :            : struct SystemTextLayoutData;
      58                 :            : class ImplFontCache;
      59                 :            : class ImplDevFontList;
      60                 :            : class ImplGetDevFontList;
      61                 :            : class ImplGetDevSizeList;
      62                 :            : class ImplMultiTextLineInfo;
      63                 :            : class SalGraphics;
      64                 :            : class Gradient;
      65                 :            : class Hatch;
      66                 :            : class Bitmap;
      67                 :            : class BitmapReadAccess;
      68                 :            : class BitmapEx;
      69                 :            : class Image;
      70                 :            : class TextRectInfo;
      71                 :            : class FontInfo;
      72                 :            : class FontMetric;
      73                 :            : class GDIMetaFile;
      74                 :            : class GfxLink;
      75                 :            : class Line;
      76                 :            : class LineInfo;
      77                 :            : class AlphaMask;
      78                 :            : class FontCharMap;
      79                 :            : class SalLayout;
      80                 :            : class ImplLayoutArgs;
      81                 :            : class ImplFontAttributes;
      82                 :            : class VirtualDevice;
      83                 :            : 
      84                 :            : namespace com {
      85                 :            : namespace sun {
      86                 :            : namespace star {
      87                 :            : namespace rendering {
      88                 :            :     class XCanvas;
      89                 :            : }}}}
      90                 :            : namespace basegfx {
      91                 :            :     class B2DHomMatrix;
      92                 :            :     class B2DPolygon;
      93                 :            :     class B2DPolyPolygon;
      94                 :            :     typedef ::std::vector< B2DPolyPolygon > B2DPolyPolygonVector;
      95                 :            : }
      96                 :            : 
      97                 :            : namespace com {
      98                 :            : namespace sun {
      99                 :            : namespace star {
     100                 :            : namespace awt {
     101                 :            :     class XGraphics;
     102                 :            : } } } }
     103                 :            : 
     104                 :            : typedef std::vector< Rectangle > MetricVector;
     105                 :            : 
     106                 :            : namespace vcl
     107                 :            : {
     108                 :            :     class PDFWriterImpl;
     109                 :            :     class ExtOutDevData;
     110                 :            :     class ITextLayout;
     111                 :            :     struct FontCapabilities;
     112                 :            :     class RenderGraphic;
     113                 :            : }
     114                 :            : 
     115                 :            : // ---------------------
     116                 :            : // - OutputDevice-Data -
     117                 :            : // ---------------------
     118                 :            : 
     119                 :            : struct ImplMapRes
     120                 :            : {
     121                 :            :     long                mnMapOfsX;          // Offset in X Richtung
     122                 :            :     long                mnMapOfsY;          // Offset in Y Richtung
     123                 :            :     long                mnMapScNumX;        // Skal.-faktor Zaehler X Richtung
     124                 :            :     long                mnMapScNumY;        // Skal.-faktor Zaehler Y Richtung
     125                 :            :     long                mnMapScDenomX;      // Skal.-faktor Nenner X Richtung
     126                 :            :     long                mnMapScDenomY;      // Skal.-faktor Nenner Y Richtung
     127                 :            : };
     128                 :            : 
     129                 :            : struct ImplThresholdRes
     130                 :            : {
     131                 :            :     long                mnThresLogToPixX;   // Schwellenwerte fuer Berechnung
     132                 :            :     long                mnThresLogToPixY;   // mit BigInts
     133                 :            :     long                mnThresPixToLogX;   // ""
     134                 :            :     long                mnThresPixToLogY;   // ""
     135                 :            : };
     136                 :            : 
     137                 :            : // ---------------
     138                 :            : // - KerningPair -
     139                 :            : // ---------------
     140                 :            : 
     141                 :            : struct KerningPair
     142                 :            : {
     143                 :            :     sal_Unicode         nChar1;
     144                 :            :     sal_Unicode         nChar2;
     145                 :            :     long                nKern;
     146                 :            : };
     147                 :            : 
     148                 :            : // ----------------------
     149                 :            : // - OutputDevice-Types -
     150                 :            : // ----------------------
     151                 :            : 
     152                 :            : // Flags for Push()
     153                 :            : #define PUSH_LINECOLOR                  ((sal_uInt16)0x0001)
     154                 :            : #define PUSH_FILLCOLOR                  ((sal_uInt16)0x0002)
     155                 :            : #define PUSH_FONT                       ((sal_uInt16)0x0004)
     156                 :            : #define PUSH_TEXTCOLOR                  ((sal_uInt16)0x0008)
     157                 :            : #define PUSH_MAPMODE                    ((sal_uInt16)0x0010)
     158                 :            : #define PUSH_CLIPREGION                 ((sal_uInt16)0x0020)
     159                 :            : #define PUSH_RASTEROP                   ((sal_uInt16)0x0040)
     160                 :            : #define PUSH_TEXTFILLCOLOR              ((sal_uInt16)0x0080)
     161                 :            : #define PUSH_TEXTALIGN                  ((sal_uInt16)0x0100)
     162                 :            : #define PUSH_REFPOINT                   ((sal_uInt16)0x0200)
     163                 :            : #define PUSH_TEXTLINECOLOR              ((sal_uInt16)0x0400)
     164                 :            : #define PUSH_TEXTLAYOUTMODE             ((sal_uInt16)0x0800)
     165                 :            : #define PUSH_TEXTLANGUAGE               ((sal_uInt16)0x1000)
     166                 :            : #define PUSH_OVERLINECOLOR              ((sal_uInt16)0x2000)
     167                 :            : #define PUSH_ALLTEXT                    (PUSH_TEXTCOLOR | PUSH_TEXTFILLCOLOR | PUSH_TEXTLINECOLOR | PUSH_OVERLINECOLOR | PUSH_TEXTALIGN | PUSH_TEXTLAYOUTMODE | PUSH_TEXTLANGUAGE)
     168                 :            : #define PUSH_ALLFONT                    (PUSH_ALLTEXT | PUSH_FONT)
     169                 :            : #define PUSH_ALL                        ((sal_uInt16)0xFFFF)
     170                 :            : 
     171                 :            : // Flags for DrawText()
     172                 :            : #define TEXT_DRAW_DISABLE               ((sal_uInt16)0x0001)
     173                 :            : #define TEXT_DRAW_MNEMONIC              ((sal_uInt16)0x0002)
     174                 :            : #define TEXT_DRAW_MONO                  ((sal_uInt16)0x0004)
     175                 :            : #define TEXT_DRAW_CLIP                  ((sal_uInt16)0x0008)
     176                 :            : #define TEXT_DRAW_LEFT                  ((sal_uInt16)0x0010)
     177                 :            : #define TEXT_DRAW_CENTER                ((sal_uInt16)0x0020)
     178                 :            : #define TEXT_DRAW_RIGHT                 ((sal_uInt16)0x0040)
     179                 :            : #define TEXT_DRAW_TOP                   ((sal_uInt16)0x0080)
     180                 :            : #define TEXT_DRAW_VCENTER               ((sal_uInt16)0x0100)
     181                 :            : #define TEXT_DRAW_BOTTOM                ((sal_uInt16)0x0200)
     182                 :            : #define TEXT_DRAW_ENDELLIPSIS           ((sal_uInt16)0x0400)
     183                 :            : #define TEXT_DRAW_PATHELLIPSIS          ((sal_uInt16)0x0800)
     184                 :            : #define TEXT_DRAW_MULTILINE             ((sal_uInt16)0x1000)
     185                 :            : #define TEXT_DRAW_WORDBREAK             ((sal_uInt16)0x2000)
     186                 :            : #define TEXT_DRAW_NEWSELLIPSIS          ((sal_uInt16)0x4000)
     187                 :            : // in the long run we should make text style flags longer
     188                 :            : // but at the moment we can get away with this 2 bit field for ellipsis style
     189                 :            : #define TEXT_DRAW_CENTERELLIPSIS        (TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_PATHELLIPSIS)
     190                 :            : 
     191                 :            : #define TEXT_DRAW_WORDBREAK_HYPHENATION (((sal_uInt16)0x8000) | TEXT_DRAW_WORDBREAK)
     192                 :            : 
     193                 :            : // Flags for CopyArea()
     194                 :            : #define COPYAREA_WINDOWINVALIDATE       ((sal_uInt16)0x0001)
     195                 :            : 
     196                 :            : // Flags for DrawImage()
     197                 :            : #define IMAGE_DRAW_DISABLE              ((sal_uInt16)0x0001)
     198                 :            : #define IMAGE_DRAW_HIGHLIGHT            ((sal_uInt16)0x0002)
     199                 :            : #define IMAGE_DRAW_DEACTIVE             ((sal_uInt16)0x0004)
     200                 :            : #define IMAGE_DRAW_COLORTRANSFORM       ((sal_uInt16)0x0008)
     201                 :            : #define IMAGE_DRAW_SEMITRANSPARENT      ((sal_uInt16)0x0010)
     202                 :            : 
     203                 :            : // WaveLine
     204                 :            : #define WAVE_FLAT                       1
     205                 :            : #define WAVE_SMALL                      2
     206                 :            : #define WAVE_NORMAL                     3
     207                 :            : 
     208                 :            : // Grid
     209                 :            : #define GRID_DOTS                       ((sal_uLong)0x00000001)
     210                 :            : #define GRID_HORZLINES                  ((sal_uLong)0x00000002)
     211                 :            : #define GRID_VERTLINES                  ((sal_uLong)0x00000004)
     212                 :            : #define GRID_LINES                      (GRID_HORZLINES | GRID_VERTLINES)
     213                 :            : 
     214                 :            : // LayoutModes for Complex Text Layout
     215                 :            : #define TEXT_LAYOUT_DEFAULT             ((sal_uLong)0x00000000)
     216                 :            : #define TEXT_LAYOUT_BIDI_LTR            ((sal_uLong)0x00000000)
     217                 :            : #define TEXT_LAYOUT_BIDI_RTL            ((sal_uLong)0x00000001)
     218                 :            : #define TEXT_LAYOUT_BIDI_STRONG         ((sal_uLong)0x00000002)
     219                 :            : #define TEXT_LAYOUT_TEXTORIGIN_LEFT     ((sal_uLong)0x00000004)
     220                 :            : #define TEXT_LAYOUT_TEXTORIGIN_RIGHT    ((sal_uLong)0x00000008)
     221                 :            : #define TEXT_LAYOUT_COMPLEX_DISABLED    ((sal_uLong)0x00000100)
     222                 :            : #define TEXT_LAYOUT_ENABLE_LIGATURES    ((sal_uLong)0x00000200)
     223                 :            : #define TEXT_LAYOUT_SUBSTITUTE_DIGITS   ((sal_uLong)0x00000400)
     224                 :            : 
     225                 :            : // DrawModes
     226                 :            : #define DRAWMODE_DEFAULT                ((sal_uLong)0x00000000)
     227                 :            : #define DRAWMODE_BLACKLINE              ((sal_uLong)0x00000001)
     228                 :            : #define DRAWMODE_BLACKFILL              ((sal_uLong)0x00000002)
     229                 :            : #define DRAWMODE_BLACKTEXT              ((sal_uLong)0x00000004)
     230                 :            : #define DRAWMODE_BLACKBITMAP            ((sal_uLong)0x00000008)
     231                 :            : #define DRAWMODE_BLACKGRADIENT          ((sal_uLong)0x00000010)
     232                 :            : #define DRAWMODE_GRAYLINE               ((sal_uLong)0x00000020)
     233                 :            : #define DRAWMODE_GRAYFILL               ((sal_uLong)0x00000040)
     234                 :            : #define DRAWMODE_GRAYTEXT               ((sal_uLong)0x00000080)
     235                 :            : #define DRAWMODE_GRAYBITMAP             ((sal_uLong)0x00000100)
     236                 :            : #define DRAWMODE_GRAYGRADIENT           ((sal_uLong)0x00000200)
     237                 :            : #define DRAWMODE_NOFILL                 ((sal_uLong)0x00000400)
     238                 :            : #define DRAWMODE_NOBITMAP               ((sal_uLong)0x00000800)
     239                 :            : #define DRAWMODE_NOGRADIENT             ((sal_uLong)0x00001000)
     240                 :            : #define DRAWMODE_GHOSTEDLINE            ((sal_uLong)0x00002000)
     241                 :            : #define DRAWMODE_GHOSTEDFILL            ((sal_uLong)0x00004000)
     242                 :            : #define DRAWMODE_GHOSTEDTEXT            ((sal_uLong)0x00008000)
     243                 :            : #define DRAWMODE_GHOSTEDBITMAP          ((sal_uLong)0x00010000)
     244                 :            : #define DRAWMODE_GHOSTEDGRADIENT        ((sal_uLong)0x00020000)
     245                 :            : #define DRAWMODE_WHITELINE              ((sal_uLong)0x00100000)
     246                 :            : #define DRAWMODE_WHITEFILL              ((sal_uLong)0x00200000)
     247                 :            : #define DRAWMODE_WHITETEXT              ((sal_uLong)0x00400000)
     248                 :            : #define DRAWMODE_WHITEBITMAP            ((sal_uLong)0x00800000)
     249                 :            : #define DRAWMODE_WHITEGRADIENT          ((sal_uLong)0x01000000)
     250                 :            : #define DRAWMODE_SETTINGSLINE           ((sal_uLong)0x02000000)
     251                 :            : #define DRAWMODE_SETTINGSFILL           ((sal_uLong)0x04000000)
     252                 :            : #define DRAWMODE_SETTINGSTEXT           ((sal_uLong)0x08000000)
     253                 :            : #define DRAWMODE_SETTINGSGRADIENT       ((sal_uLong)0x10000000)
     254                 :            : #define DRAWMODE_NOTRANSPARENCY         ((sal_uLong)0x80000000)
     255                 :            : 
     256                 :            : // Antialiasing
     257                 :            : #define ANTIALIASING_DISABLE_TEXT       ((sal_uInt16)0x0001)
     258                 :            : #define ANTIALIASING_ENABLE_B2DDRAW     ((sal_uInt16)0x0002)
     259                 :            : #define ANTIALIASING_PIXELSNAPHAIRLINE  ((sal_uInt16)0x0004)
     260                 :            : 
     261                 :            : // AddFontSubstitute
     262                 :            : #define FONT_SUBSTITUTE_ALWAYS          ((sal_uInt16)0x0001)
     263                 :            : #define FONT_SUBSTITUTE_SCREENONLY      ((sal_uInt16)0x0002)
     264                 :            : 
     265                 :            : #define DEFAULTFONT_FLAGS_ONLYONE       ((sal_uLong)0x00000001)
     266                 :            : 
     267                 :            : enum OutDevType { OUTDEV_DONTKNOW, OUTDEV_WINDOW, OUTDEV_PRINTER, OUTDEV_VIRDEV };
     268                 :            : 
     269                 :            : enum OutDevViewType { OUTDEV_VIEWTYPE_DONTKNOW, OUTDEV_VIEWTYPE_PRINTPREVIEW, OUTDEV_VIEWTYPE_SLIDESHOW };
     270                 :            : 
     271                 :            : // ----------------
     272                 :            : // - OutputDevice -
     273                 :            : // ----------------
     274                 :            : 
     275                 :            : class VirtualDevice;
     276                 :            : class Printer;
     277                 :            : class FontSelectPattern;
     278                 :            : class ImplFontMetricData;
     279                 :            : class VCLXGraphics;
     280                 :            : 
     281                 :            : typedef ::std::vector< VCLXGraphics* > VCLXGraphicsList_impl;
     282                 :            : 
     283                 :            : const char* ImplDbgCheckOutputDevice( const void* pObj );
     284                 :            : 
     285                 :            : class VCL_DLLPUBLIC OutputDevice : public Resource
     286                 :            : {
     287                 :            :     friend class Application;
     288                 :            :     friend class Bitmap;
     289                 :            :     friend class ImplImageBmp;
     290                 :            :     friend class Printer;
     291                 :            :     friend class System;
     292                 :            :     friend class VirtualDevice;
     293                 :            :     friend class Window;
     294                 :            :     friend class WorkWindow;
     295                 :            :     friend class vcl::PDFWriterImpl;
     296                 :            :     friend const char* ImplDbgCheckOutputDevice( const void* pObj );
     297                 :            :     friend void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight );
     298                 :            : 
     299                 :            : private:
     300                 :            :     mutable SalGraphics*        mpGraphics;
     301                 :            :     mutable OutputDevice*       mpPrevGraphics;
     302                 :            :     mutable OutputDevice*       mpNextGraphics;
     303                 :            :     GDIMetaFile*                mpMetaFile;
     304                 :            :     mutable ImplFontEntry*      mpFontEntry;
     305                 :            :     mutable ImplFontCache*      mpFontCache;
     306                 :            :     mutable ImplDevFontList*    mpFontList;
     307                 :            :     mutable ImplGetDevFontList* mpGetDevFontList;
     308                 :            :     mutable ImplGetDevSizeList* mpGetDevSizeList;
     309                 :            :     ImplObjStack*               mpObjStack;
     310                 :            :     ImplOutDevData*             mpOutDevData;
     311                 :            :     VCLXGraphicsList_impl*      mpUnoGraphicsList;
     312                 :            :     vcl::PDFWriterImpl*         mpPDFWriter;
     313                 :            :     vcl::ExtOutDevData*         mpExtOutDevData;
     314                 :            : 
     315                 :            :     // TEMP TEMP TEMP
     316                 :            :     VirtualDevice*      mpAlphaVDev;
     317                 :            : 
     318                 :            :     /// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
     319                 :            :     long                mnOutOffOrigX;
     320                 :            :     /// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
     321                 :            :     long                mnOutOffLogicX;
     322                 :            :     /// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
     323                 :            :     long                mnOutOffOrigY;
     324                 :            :     /// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
     325                 :            :     long                mnOutOffLogicY;
     326                 :            :     /// Output offset for device output in pixel (pseudo window offset within window system's frames)
     327                 :            :     long                mnOutOffX;
     328                 :            :     /// Output offset for device output in pixel (pseudo window offset within window system's frames)
     329                 :            :     long                mnOutOffY;
     330                 :            :     long                mnOutWidth;
     331                 :            :     long                mnOutHeight;
     332                 :            :     sal_Int32           mnDPIX;
     333                 :            :     sal_Int32           mnDPIY;
     334                 :            :     /// font specific text alignment offsets in pixel units
     335                 :            :     mutable long        mnTextOffX;
     336                 :            :     mutable long        mnTextOffY;
     337                 :            :     mutable long        mnEmphasisAscent;
     338                 :            :     mutable long        mnEmphasisDescent;
     339                 :            :     sal_uLong               mnDrawMode;
     340                 :            :     sal_uLong               mnTextLayoutMode;
     341                 :            :     ImplMapRes          maMapRes;
     342                 :            :     ImplThresholdRes    maThresRes;
     343                 :            :     OutDevType          meOutDevType;
     344                 :            :     OutDevViewType      meOutDevViewType;
     345                 :            :     Region              maRegion;           // contains the clip region, see SetClipRegion(...)
     346                 :            :     Color               maLineColor;
     347                 :            :     Color               maFillColor;
     348                 :            :     Font                maFont;
     349                 :            :     Color               maTextColor;
     350                 :            :     Color               maTextLineColor;
     351                 :            :     Color               maOverlineColor;
     352                 :            :     TextAlign           meTextAlign;
     353                 :            :     RasterOp            meRasterOp;
     354                 :            :     Wallpaper           maBackground;
     355                 :            :     AllSettings         maSettings;
     356                 :            :     MapMode             maMapMode;
     357                 :            :     Point               maRefPoint;
     358                 :            :     sal_uInt16              mnAntialiasing;
     359                 :            :     LanguageType        meTextLanguage;
     360                 :            :     mutable sal_Bool       mbMap:1,
     361                 :            :                         mbMapIsDefault:1,
     362                 :            :                         mbClipRegion:1,
     363                 :            :                         mbBackground:1,
     364                 :            :                         mbOutput:1,
     365                 :            :                         mbDevOutput:1,
     366                 :            :                         mbOutputClipped:1,
     367                 :            :                         mbLineColor:1,
     368                 :            :                         mbFillColor:1,
     369                 :            :                         mbInitLineColor:1,
     370                 :            :                         mbInitFillColor:1,
     371                 :            :                         mbInitFont:1,
     372                 :            :                         mbInitTextColor:1,
     373                 :            :                         mbInitClipRegion:1,
     374                 :            :                         mbClipRegionSet:1,
     375                 :            :                         mbKerning:1,
     376                 :            :                         mbNewFont:1,
     377                 :            :                         mbTextLines:1,
     378                 :            :                         mbTextSpecial:1,
     379                 :            :                         mbRefPoint:1,
     380                 :            :                         mbEnableRTL:1;
     381                 :            : 
     382                 :            : public:
     383                 :      23326 :     SAL_DLLPRIVATE sal_Int32    ImplGetDPIX() const { return mnDPIX; }
     384                 :      30660 :     SAL_DLLPRIVATE sal_Int32    ImplGetDPIY() const { return mnDPIY; }
     385                 :            :     SAL_DLLPRIVATE int          ImplGetGraphics() const;
     386                 :            :     SAL_DLLPRIVATE void         ImplReleaseGraphics( sal_Bool bRelease = sal_True );
     387                 :            :     SAL_DLLPRIVATE sal_Bool         ImplHasMirroredGraphics();
     388                 :            :     SAL_DLLPRIVATE void         ImplReMirror( Point &rPoint ) const;
     389                 :            :     SAL_DLLPRIVATE void         ImplReMirror( Rectangle &rRect ) const;
     390                 :            :     SAL_DLLPRIVATE void         ImplReMirror( Region &rRegion ) const;
     391                 :            :     SAL_DLLPRIVATE void         ImplInitOutDevData();
     392                 :            :     SAL_DLLPRIVATE void         ImplDeInitOutDevData();
     393                 :            :     SAL_DLLPRIVATE void         ImplInitLineColor();
     394                 :            :     SAL_DLLPRIVATE void         ImplInitFillColor();
     395                 :            :     SAL_DLLPRIVATE bool         ImplNewFont() const;
     396                 :            :     SAL_DLLPRIVATE void         ImplInitFont() const;
     397                 :            :     SAL_DLLPRIVATE void         ImplInitTextColor();
     398                 :            :     SAL_DLLPRIVATE void         ImplInitClipRegion();
     399                 :            :     SAL_DLLPRIVATE bool         ImplSelectClipRegion( const Region&, SalGraphics* pGraphics = NULL );
     400                 :            :     SAL_DLLPRIVATE void         ImplSetClipRegion( const Region* pRegion );
     401                 :            : 
     402                 :            :     SAL_DLLPRIVATE SalLayout*   ImplLayout( const String&, xub_StrLen nIndex,
     403                 :            :                                             xub_StrLen nLen, const Point& rLogicPos = Point(0,0),
     404                 :            :                                             long nLogicWidth=0, const sal_Int32* pLogicDXArray=NULL,
     405                 :            :                                             bool bFilter = false ) const;
     406                 :            :     SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( String&,
     407                 :            :                                             xub_StrLen nIndex, xub_StrLen nLen,
     408                 :            :                                             long nPixelWidth,
     409                 :            :                                             const sal_Int32* pPixelDXArray ) const;
     410                 :            :     SAL_DLLPRIVATE SalLayout*   ImplGlyphFallbackLayout( SalLayout*, ImplLayoutArgs& ) const;
     411                 :            : 
     412                 :            :     static
     413                 :            :     SAL_DLLPRIVATE XubString    ImplGetEllipsisString( const OutputDevice& rTargetDevice, const XubString& rStr,
     414                 :            :                                                        long nMaxWidth, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout );
     415                 :            :     static
     416                 :            :     SAL_DLLPRIVATE void         ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect,
     417                 :            :                                               const String& rOrigStr, sal_uInt16 nStyle,
     418                 :            :                                               MetricVector* pVector, String* pDisplayText, ::vcl::ITextLayout& _rLayout );
     419                 :            :     SAL_DLLPRIVATE void         ImplDrawTextBackground( const SalLayout& );
     420                 :            :     SAL_DLLPRIVATE void         ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bWordLine, sal_Bool bUnderlineAbove );
     421                 :            :     SAL_DLLPRIVATE bool         ImplDrawRotateText( SalLayout& );
     422                 :            :     SAL_DLLPRIVATE void         ImplDrawTextDirect( SalLayout&, sal_Bool bTextLines );
     423                 :            :     SAL_DLLPRIVATE void         ImplDrawSpecialText( SalLayout& );
     424                 :            :     SAL_DLLPRIVATE void         ImplDrawText( SalLayout& );
     425                 :            :     SAL_DLLPRIVATE Rectangle    ImplGetTextBoundRect( const SalLayout& );
     426                 :            :     SAL_DLLPRIVATE void         ImplDrawEmphasisMarks( SalLayout& );
     427                 :            : 
     428                 :            :     SAL_DLLPRIVATE void         ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
     429                 :            : 
     430                 :            :     SAL_DLLPRIVATE void         ImplInitTextLineSize();
     431                 :            :     SAL_DLLPRIVATE void         ImplInitAboveTextLineSize();
     432                 :            :     SAL_DLLPRIVATE void         ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor );
     433                 :            :     SAL_DLLPRIVATE void         ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, sal_Bool bIsAbove );
     434                 :            :     SAL_DLLPRIVATE void         ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, sal_Bool bIsAbove );
     435                 :            :     SAL_DLLPRIVATE void         ImplDrawStrikeoutLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
     436                 :            :     SAL_DLLPRIVATE void         ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
     437                 :            :     SAL_DLLPRIVATE void         ImplDrawTextLine( long nBaseX, long nX, long nY, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bUnderlineAbove );
     438                 :            :     SAL_DLLPRIVATE void         ImplDrawMnemonicLine( long nX, long nY, long nWidth );
     439                 :            :     SAL_DLLPRIVATE void         ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient );
     440                 :            :     SAL_DLLPRIVATE void         ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
     441                 :            :     static
     442                 :            :     SAL_DLLPRIVATE long         ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const XubString& rStr, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout );
     443                 :            :     SAL_DLLPRIVATE void         ImplInitFontList() const;
     444                 :            :     SAL_DLLPRIVATE void         ImplUpdateFontData( bool bNewFontLists );
     445                 :            :     SAL_DLLPRIVATE static void  ImplUpdateAllFontData( bool bNewFontLists );
     446                 :            : 
     447                 :            :     SAL_DLLPRIVATE long         ImplLogicXToDevicePixel( long nX ) const;
     448                 :            :     SAL_DLLPRIVATE long         ImplLogicYToDevicePixel( long nY ) const;
     449                 :            :     SAL_DLLPRIVATE long         ImplLogicWidthToDevicePixel( long nWidth ) const;
     450                 :            :     SAL_DLLPRIVATE long         ImplLogicHeightToDevicePixel( long nHeight ) const;
     451                 :            :     SAL_DLLPRIVATE long         ImplDevicePixelToLogicWidth( long nWidth ) const;
     452                 :            :     SAL_DLLPRIVATE long         ImplDevicePixelToLogicHeight( long nHeight ) const;
     453                 :            :     SAL_DLLPRIVATE float        ImplFloatLogicHeightToDevicePixel( float ) const;
     454                 :            :     SAL_DLLPRIVATE Point        ImplLogicToDevicePixel( const Point& rLogicPt ) const;
     455                 :            :     SAL_DLLPRIVATE Size         ImplLogicToDevicePixel( const Size& rLogicSize ) const;
     456                 :            :     SAL_DLLPRIVATE Rectangle    ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const;
     457                 :            :     SAL_DLLPRIVATE ::basegfx::B2DPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolygon&  ) const;
     458                 :            :     SAL_DLLPRIVATE ::basegfx::B2DPolyPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolyPolygon& ) const;
     459                 :            :     SAL_DLLPRIVATE Polygon      ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const;
     460                 :            :     SAL_DLLPRIVATE PolyPolygon  ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyPoly ) const;
     461                 :            :     SAL_DLLPRIVATE LineInfo     ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
     462                 :            :     SAL_DLLPRIVATE Rectangle    ImplDevicePixelToLogic( const Rectangle& rLogicRect ) const;
     463                 :            :     SAL_DLLPRIVATE Region       ImplPixelToDevicePixel( const Region& rRegion ) const;
     464                 :            :     SAL_DLLPRIVATE void         ImplInvalidateViewTransform();
     465                 :            :     SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
     466                 :            : 
     467                 :            :     SAL_DLLPRIVATE void         ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pClipPolyPoly = NULL );
     468                 :            :     SAL_DLLPRIVATE void         ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const PolyPolygon* pClipPolyPoly = NULL );
     469                 :            :     SAL_DLLPRIVATE void         ImplDrawPolyPolygon( sal_uInt16 nPoly, const PolyPolygon& rPolyPoly );
     470                 :            :     SAL_DLLPRIVATE void         ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, sal_Bool bMtf, const PolyPolygon* pClipPolyPoly );
     471                 :            :     SAL_DLLPRIVATE void         ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, sal_Bool bMtf, const PolyPolygon* pClipPolyPoly );
     472                 :            : 
     473                 :            :     SAL_DLLPRIVATE void         ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, sal_Bool bMtf );
     474                 :            :     SAL_DLLPRIVATE void         ImplCalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
     475                 :            :     SAL_DLLPRIVATE void         ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, sal_Bool bMtf );
     476                 :            : 
     477                 :            :     SAL_DLLPRIVATE void         ImplDrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
     478                 :            :     SAL_DLLPRIVATE void         ImplDrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
     479                 :            :     SAL_DLLPRIVATE void         ImplDrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
     480                 :            :     SAL_DLLPRIVATE void         ImplDrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
     481                 :            : 
     482                 :            :     SAL_DLLPRIVATE void         ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pPosAry );
     483                 :            :     SAL_DLLPRIVATE void         ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
     484                 :            :                                         const Point& rSrcPtPixel, const Size& rSrcSizePixel,
     485                 :            :                                         const Bitmap& rBitmap, const sal_uLong nAction );
     486                 :            :     SAL_DLLPRIVATE void         ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
     487                 :            :                                         const Point& rSrcPtPixel, const Size& rSrcSizePixel,
     488                 :            :                                         const BitmapEx& rBitmapEx, const sal_uLong nAction );
     489                 :            :     SAL_DLLPRIVATE void         ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
     490                 :            :                                         const Point& rSrcPtPixel, const Size& rSrcSizePixel,
     491                 :            :                                         const Bitmap& rBitmap, const Color& rMaskColor,
     492                 :            :                                         const sal_uLong nAction );
     493                 :            :     SAL_DLLPRIVATE void         ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
     494                 :            :                                         const Point& rDestPt, const Size& rDestSize,
     495                 :            :                                         const Point& rSrcPtPixel, const Size& rSrcSizePixel );
     496                 :            :     SAL_DLLPRIVATE Bitmap       ImplBlend( Bitmap              aBmp,
     497                 :            :                                            BitmapReadAccess*   pP,
     498                 :            :                                            BitmapReadAccess*   pA,
     499                 :            :                                            const sal_Int32     nOffY,
     500                 :            :                                            const sal_Int32     nDstHeight,
     501                 :            :                                            const sal_Int32     nOffX,
     502                 :            :                                            const sal_Int32     nDstWidth,
     503                 :            :                                            const Rectangle&    aBmpRect,
     504                 :            :                                            const Size&         aOutSz,
     505                 :            :                                            const bool          bHMirr,
     506                 :            :                                            const bool          bVMirr,
     507                 :            :                                            const long*         pMapX,
     508                 :            :                                            const long*         pMapY );
     509                 :            :     SAL_DLLPRIVATE Bitmap       ImplBlendWithAlpha( Bitmap              aBmp,
     510                 :            :                                                     BitmapReadAccess*   pP,
     511                 :            :                                                     BitmapReadAccess*   pA,
     512                 :            :                                                     const Rectangle&    aDstRect,
     513                 :            :                                                     const sal_Int32     nOffY,
     514                 :            :                                                     const sal_Int32     nDstHeight,
     515                 :            :                                                     const sal_Int32     nOffX,
     516                 :            :                                                     const sal_Int32     nDstWidth,
     517                 :            :                                                     const long*         pMapX,
     518                 :            :                                                     const long*         pMapY );
     519                 :            :     SAL_DLLPRIVATE void         ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask,
     520                 :            :                                         const Point& rDestPt, const Size& rDestSize,
     521                 :            :                                         const Point& rSrcPtPixel, const Size& rSrcSizePixel );
     522                 :            :     SAL_DLLPRIVATE void         ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
     523                 :            :                                         const Point& rDestPt, const Size& rDestSize,
     524                 :            :                                         const Point& rSrcPtPixel, const Size& rSrcSizePixel );
     525                 :            :     SAL_DLLPRIVATE void         ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
     526                 :            :                                         const OutputDevice& rOutDev, const Region& rRegion );
     527                 :            :     SAL_DLLPRIVATE void         ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
     528                 :            :                                         OutputDevice& rOutDev );
     529                 :            : 
     530                 :            :     SAL_DLLPRIVATE sal_Bool         ImplIsRecordLayout() const;
     531                 :            : 
     532                 :            :                    void         ImplAddDevFontSubstitute( const XubString& rFontName,
     533                 :            :                                                   const XubString& rReplaceFontName,
     534                 :            :                                                   sal_uInt16 nFlags = 0 );
     535                 :            : 
     536                 :            :     SAL_DLLPRIVATE static FontEmphasisMark ImplGetEmphasisMarkStyle( const Font& rFont );
     537                 :            :     SAL_DLLPRIVATE static sal_Bool ImplIsUnderlineAbove( const Font& );
     538                 :            : 
     539                 :            :     // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
     540                 :            :     SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
     541                 :            :     SAL_DLLPRIVATE Color ImplDrawModeToColor( const Color& rColor ) const;
     542                 :            : 
     543                 :            :     // #i101491#
     544                 :            :     // Helper which holds the old line geometry creation and is extended to use AA when
     545                 :            :     // switched on. Advantage is that line geometry is only temporarily used for paint
     546                 :            :     SAL_DLLPRIVATE void ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo);
     547                 :            : 
     548                 :            :     // #i101491#
     549                 :            :     // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
     550                 :            :     // without MetaFile processing
     551                 :            :     SAL_DLLPRIVATE void ImpDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
     552                 :            : 
     553                 :            :     // #i101491#
     554                 :            :     // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool. Contains no AA check.
     555                 :            :     SAL_DLLPRIVATE bool ImpTryDrawPolyLineDirect(const basegfx::B2DPolygon& rB2DPolygon, double fLineWidth, basegfx::B2DLineJoin eLineJoin);
     556                 :            : 
     557                 :            :     // Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area)
     558                 :            :     void impPaintLineGeometryWithEvtlExpand(const LineInfo& rInfo, basegfx::B2DPolyPolygon aLinePolyPolygon);
     559                 :            : 
     560                 :            :     SAL_DLLPRIVATE SalLayout* getFallbackFontThatFits(ImplFontEntry &rFallbackFont,
     561                 :            :         FontSelectPattern &rFontSelData, int nFallbackLevel,
     562                 :            :         ImplLayoutArgs& rLayoutArgs, const ImplFontMetricData& rOrigMetric) const;
     563                 :            : protected:
     564                 :            :                         OutputDevice();
     565                 :            : 
     566                 :            : private:
     567                 :            :     SAL_DLLPRIVATE                OutputDevice( const OutputDevice& rOutDev );
     568                 :            :     SAL_DLLPRIVATE OutputDevice&  operator =( const OutputDevice& rOutDev );
     569                 :            : 
     570                 :            : public:
     571                 :            :     virtual             ~OutputDevice();
     572                 :            : 
     573                 :    3385939 :     OutDevType          GetOutDevType() const { return meOutDevType; }
     574                 :            : 
     575                 :            :     /** query an <code>OutputDevice</code> whether it spports a specific operation
     576                 :            : 
     577                 :            :     @return
     578                 :            :     true if operation supported, else false
     579                 :            :     */
     580                 :            :     bool                supportsOperation( OutDevSupportType ) const;
     581                 :            : 
     582                 :      57448 :     vcl::PDFWriterImpl* GetPDFWriter() const { return mpPDFWriter; }
     583                 :            : 
     584                 :          0 :     void                SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
     585                 :     217356 :     vcl::ExtOutDevData* GetExtOutDevData() const { return mpExtOutDevData; }
     586                 :            : 
     587                 :            :     void                DrawTextLine( const Point& rPos, long nWidth,
     588                 :            :                                       FontStrikeout eStrikeout,
     589                 :            :                                       FontUnderline eUnderline,
     590                 :            :                                       FontUnderline eOverline,
     591                 :            :                                       sal_Bool bUnderlineAbove = sal_False );
     592                 :            : 
     593                 :            :     void                DrawText( const Point& rStartPt, const XubString& rStr,
     594                 :            :                                   xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
     595                 :            :                                   MetricVector* pVector = NULL, String* pDisplayText = NULL );
     596                 :            :     long                GetTextWidth( const XubString& rStr, xub_StrLen nIndex = 0,
     597                 :            :                                       xub_StrLen nLen = STRING_LEN ) const;
     598                 :            :     /// Height where any character of the current font fits; in logic coordinates.
     599                 :            :     long                GetTextHeight() const;
     600                 :            :     void                DrawTextArray( const Point& rStartPt, const XubString& rStr,
     601                 :            :                                        const sal_Int32* pDXAry = NULL,
     602                 :            :                                        xub_StrLen nIndex = 0,
     603                 :            :                                        xub_StrLen nLen = STRING_LEN );
     604                 :            :     long                GetTextArray( const XubString& rStr, sal_Int32* pDXAry = NULL,
     605                 :            :                                       xub_StrLen nIndex = 0,
     606                 :            :                                       xub_StrLen nLen = STRING_LEN ) const;
     607                 :            :     bool                GetCaretPositions( const XubString&, sal_Int32* pCaretXArray,
     608                 :            :                                       xub_StrLen nIndex, xub_StrLen nLen,
     609                 :            :                                       sal_Int32* pDXAry = NULL, long nWidth = 0,
     610                 :            :                                       sal_Bool bCellBreaking = sal_True ) const;
     611                 :            :     void                DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
     612                 :            :                                          const XubString& rStr,
     613                 :            :                                          xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN );
     614                 :            :     xub_StrLen          GetTextBreak( const XubString& rStr, long nTextWidth,
     615                 :            :                                       xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
     616                 :            :                                       long nCharExtra = 0, sal_Bool bCellBreaking = sal_True ) const;
     617                 :            :     xub_StrLen          GetTextBreak( const XubString& rStr, long nTextWidth,
     618                 :            :                                       sal_uInt16 nExtraChar, xub_StrLen& rExtraCharPos,
     619                 :            :                                       xub_StrLen nIndex, xub_StrLen nLen,
     620                 :            :                                       long nCharExtra = 0 ) const;
     621                 :            :     /** Generate MetaTextActions for the text rect
     622                 :            : 
     623                 :            :         This method splits up the text rect into multiple
     624                 :            :         MetaTextActions, one for each line of text. This is comparable
     625                 :            :         to AddGradientActions(), which splits up a gradient into its
     626                 :            :         constituing polygons. Parameter semantics fully compatible to
     627                 :            :         DrawText().
     628                 :            :      */
     629                 :            :     void                AddTextRectActions( const Rectangle& rRect,
     630                 :            :                                             const String&    rOrigStr,
     631                 :            :                                             sal_uInt16           nStyle,
     632                 :            :                                             GDIMetaFile&     rMtf );
     633                 :            :     void                DrawText( const Rectangle& rRect,
     634                 :            :                                   const XubString& rStr, sal_uInt16 nStyle = 0,
     635                 :            :                                   MetricVector* pVector = NULL, String* pDisplayText = NULL,
     636                 :            :                                   ::vcl::ITextLayout* _pTextLayout = NULL );
     637                 :            :     Rectangle           GetTextRect( const Rectangle& rRect,
     638                 :            :                                      const XubString& rStr, sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK,
     639                 :            :                                      TextRectInfo* pInfo = NULL,
     640                 :            :                                      const ::vcl::ITextLayout* _pTextLayout = NULL ) const;
     641                 :            :     XubString           GetEllipsisString( const XubString& rStr, long nMaxWidth,
     642                 :            :                                            sal_uInt16 nStyle = TEXT_DRAW_ENDELLIPSIS ) const;
     643                 :            :     void                DrawCtrlText( const Point& rPos, const XubString& rStr,
     644                 :            :                                       xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
     645                 :            :                                       sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC, MetricVector* pVector = NULL, String* pDisplayText = NULL );
     646                 :            :     long                GetCtrlTextWidth( const XubString& rStr, xub_StrLen nIndex = 0,
     647                 :            :                                           xub_StrLen nLen = STRING_LEN,
     648                 :            :                                           sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC ) const;
     649                 :            :     static XubString    GetNonMnemonicString( const XubString& rStr, xub_StrLen& rMnemonicPos );
     650                 :      10546 :     static XubString    GetNonMnemonicString( const XubString& rStr )
     651         [ +  - ]:      10546 :                             { xub_StrLen nDummy; return GetNonMnemonicString( rStr, nDummy ); }
     652                 :            : 
     653                 :            :     sal_uLong               GetKerningPairCount() const;
     654                 :            :     void                GetKerningPairs( sal_uLong nPairs, KerningPair* pKernPairs ) const;
     655                 :            : 
     656                 :            :     sal_Bool                GetTextBoundRect( Rectangle& rRect,
     657                 :            :                             const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
     658                 :            :                             sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
     659                 :            :     sal_Bool                GetTextOutline( PolyPolygon&,
     660                 :            :                             const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0,
     661                 :            :                             xub_StrLen nLen = STRING_LEN, sal_Bool bOptimize = sal_True,
     662                 :            :                             sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
     663                 :            :     sal_Bool                GetTextOutlines( PolyPolyVector&,
     664                 :            :                             const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0,
     665                 :            :                             xub_StrLen nLen = STRING_LEN, sal_Bool bOptimize = sal_True,
     666                 :            :                             sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
     667                 :            :     sal_Bool                GetTextOutlines( ::basegfx::B2DPolyPolygonVector&,
     668                 :            :                             const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0,
     669                 :            :                             xub_StrLen nLen = STRING_LEN, sal_Bool bOptimize = sal_True,
     670                 :            :                             sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
     671                 :            :     sal_Bool                GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex,
     672                 :            :                             int nLen, int nBase, MetricVector& rVector );
     673                 :            : 
     674                 :            :     void                DrawPixel( const Point& rPt );
     675                 :            :     void                DrawPixel( const Point& rPt, const Color& rColor );
     676                 :            :     void                DrawPixel( const Polygon& rPts, const Color* pColors = NULL );
     677                 :            :     void                DrawPixel( const Polygon& rPts, const Color& rColor );
     678                 :            : 
     679                 :            :     void                DrawLine( const Point& rStartPt, const Point& rEndPt );
     680                 :            :     void                DrawLine( const Point& rStartPt, const Point& rEndPt,
     681                 :            :                                   const LineInfo& rLineInfo );
     682                 :            : 
     683                 :            :     /** Render the given polygon as a line stroke
     684                 :            : 
     685                 :            :         The given polygon is stroked with the current LineColor, start
     686                 :            :         and end point are not automatically connected
     687                 :            : 
     688                 :            :         @see DrawPolygon
     689                 :            :         @see DrawPolyPolygon
     690                 :            :      */
     691                 :            :     void                DrawPolyLine( const Polygon& rPoly );
     692                 :            :     void                DrawPolyLine( const basegfx::B2DPolygon&, double fLineWidth = 0.0, basegfx::B2DLineJoin = basegfx::B2DLINEJOIN_ROUND );
     693                 :            : 
     694                 :            :     /** Render the given polygon as a line stroke
     695                 :            : 
     696                 :            :         The given polygon is stroked with the current LineColor, start
     697                 :            :         and end point are not automatically connected. The line is
     698                 :            :         rendered according to the specified LineInfo, e.g. supplying a
     699                 :            :         dash pattern, or a line thickness.
     700                 :            : 
     701                 :            :         @see DrawPolygon
     702                 :            :         @see DrawPolyPolygon
     703                 :            :      */
     704                 :            :     void                DrawPolyLine( const Polygon& rPoly,
     705                 :            :                                       const LineInfo& rLineInfo );
     706                 :            : 
     707                 :            :     /** Render the given polygon
     708                 :            : 
     709                 :            :         The given polygon is stroked with the current LineColor, and
     710                 :            :         filled with the current FillColor. If one of these colors are
     711                 :            :         transparent, the corresponding stroke or fill stays
     712                 :            :         invisible. Start and end point of the polygon are
     713                 :            :         automatically connected.
     714                 :            : 
     715                 :            :         @see DrawPolyLine
     716                 :            :      */
     717                 :            :     void                DrawPolygon( const Polygon& rPoly );
     718                 :            :     void                DrawPolygon( const basegfx::B2DPolygon& );
     719                 :            : 
     720                 :            :     /** Render the given poly-polygon
     721                 :            : 
     722                 :            :         The given poly-polygon is stroked with the current LineColor,
     723                 :            :         and filled with the current FillColor. If one of these colors
     724                 :            :         are transparent, the corresponding stroke or fill stays
     725                 :            :         invisible. Start and end points of the contained polygons are
     726                 :            :         automatically connected.
     727                 :            : 
     728                 :            :         @see DrawPolyLine
     729                 :            :      */
     730                 :            :     void                DrawPolyPolygon( const PolyPolygon& rPolyPoly );
     731                 :            :     void                DrawPolyPolygon( const basegfx::B2DPolyPolygon& );
     732                 :            : 
     733                 :            :     void                DrawRect( const Rectangle& rRect );
     734                 :            :     void                DrawRect( const Rectangle& rRect,
     735                 :            :                                   sal_uLong nHorzRount, sal_uLong nVertRound );
     736                 :            :     void                DrawEllipse( const Rectangle& rRect );
     737                 :            :     void                DrawArc( const Rectangle& rRect,
     738                 :            :                                  const Point& rStartPt, const Point& rEndPt );
     739                 :            :     void                DrawPie( const Rectangle& rRect,
     740                 :            :                                  const Point& rStartPt, const Point& rEndPt );
     741                 :            :     void                DrawChord( const Rectangle& rRect,
     742                 :            :                                    const Point& rStartPt, const Point& rEndPt );
     743                 :            : 
     744                 :            :     void                DrawOutDev( const Point& rDestPt, const Size& rDestSize,
     745                 :            :                                     const Point& rSrcPt,  const Size& rSrcSize );
     746                 :            :     void                DrawOutDev( const Point& rDestPt, const Size& rDestSize,
     747                 :            :                                     const Point& rSrcPt,  const Size& rSrcSize,
     748                 :            :                                     const OutputDevice& rOutDev );
     749                 :            :     void                CopyArea( const Point& rDestPt,
     750                 :            :                                   const Point& rSrcPt,  const Size& rSrcSize,
     751                 :            :                                   sal_uInt16 nFlags = 0 );
     752                 :            : 
     753                 :            :     void                DrawBitmap( const Point& rDestPt,
     754                 :            :                                     const Bitmap& rBitmap );
     755                 :            :     void                DrawBitmap( const Point& rDestPt, const Size& rDestSize,
     756                 :            :                                     const Bitmap& rBitmap );
     757                 :            :     void                DrawBitmap( const Point& rDestPt, const Size& rDestSize,
     758                 :            :                                     const Point& rSrcPtPixel, const Size& rSrcSizePixel,
     759                 :            :                                     const Bitmap& rBitmap );
     760                 :            : 
     761                 :            :     void                DrawBitmapEx( const Point& rDestPt,
     762                 :            :                                       const BitmapEx& rBitmapEx );
     763                 :            :     void                DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
     764                 :            :                                       const BitmapEx& rBitmapEx );
     765                 :            :     void                DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
     766                 :            :                                       const Point& rSrcPtPixel, const Size& rSrcSizePixel,
     767                 :            :                                       const BitmapEx& rBitmapEx );
     768                 :            : 
     769                 :            :     void                DrawMask( const Point& rDestPt,
     770                 :            :                                   const Bitmap& rBitmap, const Color& rMaskColor );
     771                 :            :     void                DrawMask( const Point& rDestPt, const Size& rDestSize,
     772                 :            :                                   const Bitmap& rBitmap, const Color& rMaskColor );
     773                 :            :     void                DrawMask( const Point& rDestPt, const Size& rDestSize,
     774                 :            :                                   const Point& rSrcPtPixel, const Size& rSrcSizePixel,
     775                 :            :                                   const Bitmap& rBitmap, const Color& rMaskColor );
     776                 :            : 
     777                 :            :     void                DrawImage( const Point& rPos,
     778                 :            :                                    const Image& rImage, sal_uInt16 nStyle = 0 );
     779                 :            :     void                DrawImage( const Point& rPos, const Size& rSize,
     780                 :            :                                    const Image& rImage, sal_uInt16 nStyle = 0 );
     781                 :            : 
     782                 :            :     void                DrawGradient( const Rectangle& rRect, const Gradient& rGradient );
     783                 :            :     void                DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
     784                 :            :     void                AddGradientActions( const Rectangle& rRect,
     785                 :            :                                             const Gradient& rGradient,
     786                 :            :                                             GDIMetaFile& rMtf );
     787                 :            : 
     788                 :            : #if defined(_MSC_VER) && (_MSC_VER >= 1400)
     789                 :            :     void                DrawHatch( const PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
     790                 :            :     void                AddHatchActions( const PolyPolygon& rPolyPoly,
     791                 :            :                                          const ::Hatch& rHatch,
     792                 :            :                                          GDIMetaFile& rMtf );
     793                 :            : #else
     794                 :            :     void                DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch );
     795                 :            :     void                AddHatchActions( const PolyPolygon& rPolyPoly,
     796                 :            :                                          const Hatch& rHatch,
     797                 :            :                                          GDIMetaFile& rMtf );
     798                 :            : #endif
     799                 :            : 
     800                 :            :     void                DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
     801                 :            :     void                DrawWaveLine( const Point& rStartPos, const Point& rEndPos, sal_uInt16 nStyle );
     802                 :            :     void                DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags );
     803                 :            : 
     804                 :            :     void                DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
     805                 :            :     void                DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency);
     806                 :            :     void                DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
     807                 :            :                                          const Gradient& rTransparenceGradient );
     808                 :            : 
     809                 :            :     /** Added return value to see if EPS could be painted directly.
     810                 :            :         Theoreticaly, handing over a matrix would be needed to handle
     811                 :            :         painting rotated EPS files (e.g. contained in Metafiles). This
     812                 :            :         would then need to be supported for Mac and PS printers, but
     813                 :            :         that's too much for now, wrote #i107046# for this */
     814                 :            :     bool                DrawEPS( const Point& rPt, const Size& rSz,
     815                 :            :                                  const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL );
     816                 :            : 
     817                 :            :     void                DrawRenderGraphic( const Point& rPt, const Size& rSz,
     818                 :            :                                            const ::vcl::RenderGraphic& rRenderGraphic );
     819                 :            : 
     820                 :            :     Color               GetPixel( const Point& rPt ) const;
     821                 :            : 
     822                 :            :     Bitmap              GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
     823                 :            : 
     824                 :            :     /** Query extended bitmap (with alpha channel, if available).
     825                 :            :      */
     826                 :            :     BitmapEx            GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
     827                 :            : 
     828                 :            :     void                EnableMapMode( sal_Bool bEnable = sal_True );
     829                 :     427702 :     sal_Bool                IsMapModeEnabled() const { return mbMap; }
     830                 :            : 
     831                 :            :     // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
     832                 :            :     void                EnableRTL( sal_Bool bEnable = sal_True);
     833                 :    8444343 :     sal_Bool                IsRTLEnabled() const { return mbEnableRTL; }
     834                 :            : 
     835                 :            :     void                SetConnectMetaFile( GDIMetaFile* pMtf );
     836                 :     224757 :     GDIMetaFile*        GetConnectMetaFile() const { return mpMetaFile; }
     837                 :            : 
     838                 :            :     void                EnableOutput( sal_Bool bEnable = sal_True );
     839                 :      10840 :     sal_Bool                IsOutputEnabled() const { return mbOutput; }
     840                 :            :     sal_Bool                IsDeviceOutput() const { return mbDevOutput; }
     841 [ +  + ][ +  + ]:    3906724 :     sal_Bool                IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
     842                 :            :     sal_Bool                IsOutputNecessary() const { return ((mbOutput && mbDevOutput) || (mpMetaFile != NULL)); }
     843                 :            : 
     844                 :            :     void                SetClipRegion();
     845                 :            :     void                SetClipRegion( const Region& rRegion );
     846                 :            :     Region              GetClipRegion() const;
     847                 :      86545 :     sal_Bool                IsClipRegion() const { return mbClipRegion; }
     848                 :            :     Region              GetActiveClipRegion() const;
     849                 :            : 
     850                 :            :     void                MoveClipRegion( long nHorzMove, long nVertMove );
     851                 :            :     void                IntersectClipRegion( const Rectangle& rRect );
     852                 :            :     void                IntersectClipRegion( const Region& rRegion );
     853                 :            : 
     854                 :            :     void                SetAntialiasing( sal_uInt16 nMode =  0 );
     855                 :     308541 :     sal_uInt16              GetAntialiasing() const { return mnAntialiasing; }
     856                 :            : 
     857                 :            :     void                SetDrawMode( sal_uLong nDrawMode );
     858                 :    1909156 :     sal_uLong               GetDrawMode() const { return mnDrawMode; }
     859                 :            : 
     860                 :            :     void                SetLayoutMode( sal_uLong nTextLayoutMode );
     861                 :     690546 :     sal_uLong               GetLayoutMode() const { return mnTextLayoutMode; }
     862                 :            : 
     863                 :            :     void                SetDigitLanguage( LanguageType );
     864                 :     489806 :     LanguageType        GetDigitLanguage() const { return meTextLanguage; }
     865                 :            : 
     866                 :            :     void                SetRasterOp( RasterOp eRasterOp );
     867                 :     267972 :     RasterOp            GetRasterOp() const { return meRasterOp; }
     868                 :            : 
     869                 :            :     /**
     870                 :            :     If this OutputDevice is used for displaying a Print Preview
     871                 :            :     the OutDevViewType should be set to 'OUTDEV_VIEWTYPE_PRINTPREVIEW'.
     872                 :            : 
     873                 :            :     A View than can make painting decisions dependent on this OutDevViewType.
     874                 :            :     E.g. text colors need to be handled different, dependent on whether it's a PrintPreview or not. (see #106611# for more)
     875                 :            :     */
     876                 :         16 :     void                SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
     877                 :       4042 :     OutDevViewType      GetOutDevViewType() const { return meOutDevViewType; }
     878                 :            : 
     879                 :            :     void                SetLineColor();
     880                 :            :     void                SetLineColor( const Color& rColor );
     881                 :     477189 :     const Color&        GetLineColor() const { return maLineColor; }
     882                 :     158953 :     sal_Bool                IsLineColor() const { return mbLineColor; }
     883                 :            : 
     884                 :            :     void                SetFillColor();
     885                 :            :     void                SetFillColor( const Color& rColor );
     886                 :     379729 :     const Color&        GetFillColor() const { return maFillColor; }
     887                 :      33300 :     sal_Bool                IsFillColor() const { return mbFillColor; }
     888                 :            : 
     889                 :            :     void                SetBackground();
     890                 :            :     void                SetBackground( const Wallpaper& rBackground );
     891                 :            : 
     892                 :     285289 :     const Wallpaper&    GetBackground() const { return maBackground; }
     893                 :     547459 :     sal_Bool                IsBackground() const { return mbBackground; }
     894                 :            : 
     895                 :            :     void                SetFont( const Font& rNewFont );
     896                 :    1643106 :     const Font&         GetFont() const { return maFont; }
     897                 :            : 
     898                 :            :     SystemFontData        GetSysFontData( int nFallbacklevel ) const;
     899                 :            :     SystemTextLayoutData  GetSysTextLayoutData( const Point& rStartPt, const XubString& rStr,
     900                 :            :                                                 xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
     901                 :            :                                                 const sal_Int32* pDXAry = NULL ) const;
     902                 :            : 
     903                 :            :     void                SetTextColor( const Color& rColor );
     904                 :     330761 :     const Color&        GetTextColor() const { return maTextColor; }
     905                 :            :     void                SetTextFillColor();
     906                 :            :     void                SetTextFillColor( const Color& rColor );
     907                 :            : 
     908                 :            :     Color               GetTextFillColor() const;
     909                 :     221785 :     sal_Bool                IsTextFillColor() const { return !maFont.IsTransparent(); }
     910                 :            :     void                SetTextLineColor();
     911                 :            :     void                SetTextLineColor( const Color& rColor );
     912                 :     262774 :     const Color&        GetTextLineColor() const { return maTextLineColor; }
     913                 :     109130 :     sal_Bool                IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); }
     914                 :            :     void                SetOverlineColor();
     915                 :            :     void                SetOverlineColor( const Color& rColor );
     916                 :     262706 :     const Color&        GetOverlineColor() const { return maOverlineColor; }
     917                 :     109068 :     sal_Bool                IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); }
     918                 :            :     void                SetTextAlign( TextAlign eAlign );
     919                 :      90804 :     TextAlign           GetTextAlign() const { return maFont.GetAlign(); }
     920                 :            : 
     921                 :            :     virtual void        SetSettings( const AllSettings& rSettings );
     922                 :    1670854 :     const AllSettings&  GetSettings() const { return maSettings; }
     923                 :            : 
     924                 :            :     SystemGraphicsData  GetSystemGfxData() const;
     925                 :            :     ::com::sun::star::uno::Any GetSystemGfxDataAny() const;
     926                 :            : 
     927                 :            :     virtual void        SetMapMode();
     928                 :            :     virtual void        SetMapMode( const MapMode& rNewMapMode );
     929                 :            :     virtual void        SetRelativeMapMode( const MapMode& rNewMapMode );
     930                 :     912264 :     const MapMode&      GetMapMode() const { return maMapMode; }
     931                 :      54474 :     sal_Bool                IsMapMode() const { return mbMap; }
     932                 :            : 
     933                 :            :     void                SetRefPoint();
     934                 :            :     void                SetRefPoint( const Point& rRefPoint );
     935                 :          0 :     const Point&        GetRefPoint() const { return maRefPoint; }
     936                 :      11378 :     sal_Bool                IsRefPoint() const { return mbRefPoint; }
     937                 :            : 
     938                 :            :      // #i75163#
     939                 :            :     basegfx::B2DHomMatrix GetViewTransformation() const;
     940                 :            :     basegfx::B2DHomMatrix GetInverseViewTransformation() const;
     941                 :            : 
     942                 :            :     basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
     943                 :            :     basegfx::B2DHomMatrix GetInverseViewTransformation( const MapMode& rMapMode ) const;
     944                 :            : 
     945                 :            : 
     946                 :            :     /** Set an offset in pixel
     947                 :            : 
     948                 :            :         This method offsets every drawing operation that converts its
     949                 :            :         coordinates to pixel by the given value. Normally, the effect
     950                 :            :         can be achieved by setting a MapMode with a different
     951                 :            :         origin. Unfortunately, this origin is in logical coordinates
     952                 :            :         and can lead to rounding errors (see #102532# for details).
     953                 :            : 
     954                 :            :         @attention This offset is only applied when converting to
     955                 :            :         pixel, i.e. some output modes such as metafile recordings
     956                 :            :         might be completely unaffected by this method! Use with
     957                 :            :         care. Furthermore, if the OutputDevice's MapMode is the
     958                 :            :         default (that's MAP_PIXEL), then, too, any pixel offset set is
     959                 :            :         ignored. This might be unintuitive for cases, but would have
     960                 :            :         been far more fragile to implement. What's more, the reason
     961                 :            :         why the pixel offset was introduced (avoiding rounding errors)
     962                 :            :         does not apply for MAP_PIXEL, because one can always use the
     963                 :            :         MapMode origin then.
     964                 :            : 
     965                 :            :         @param rOffset
     966                 :            :         The offset in pixel
     967                 :            :      */
     968                 :            :     void                SetPixelOffset( const Size& rOffset );
     969                 :            : 
     970                 :            :     /** Get the offset in pixel
     971                 :            : 
     972                 :            :         @see OutputDevice::SetPixelOffset for details
     973                 :            : 
     974                 :            :         @return the current offset in pixel
     975                 :            :      */
     976                 :            :     Size                GetPixelOffset() const;
     977                 :            : 
     978                 :            :     Point               LogicToPixel( const Point& rLogicPt ) const;
     979                 :            :     Size                LogicToPixel( const Size& rLogicSize ) const;
     980                 :            :     Rectangle           LogicToPixel( const Rectangle& rLogicRect ) const;
     981                 :            :     Polygon             LogicToPixel( const Polygon& rLogicPoly ) const;
     982                 :            :     PolyPolygon         LogicToPixel( const PolyPolygon& rLogicPolyPoly ) const;
     983                 :            :     Region              LogicToPixel( const Region& rLogicRegion )const;
     984                 :            :     Point               LogicToPixel( const Point& rLogicPt,
     985                 :            :                                       const MapMode& rMapMode ) const;
     986                 :            :     Size                LogicToPixel( const Size& rLogicSize,
     987                 :            :                                       const MapMode& rMapMode ) const;
     988                 :            :     Rectangle           LogicToPixel( const Rectangle& rLogicRect,
     989                 :            :                                       const MapMode& rMapMode ) const;
     990                 :            :     Polygon             LogicToPixel( const Polygon& rLogicPoly,
     991                 :            :                                       const MapMode& rMapMode ) const;
     992                 :            :     basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly,
     993                 :            :                                           const MapMode& rMapMode ) const;
     994                 :            :     Point               PixelToLogic( const Point& rDevicePt ) const;
     995                 :            :     Size                PixelToLogic( const Size& rDeviceSize ) const;
     996                 :            :     Rectangle           PixelToLogic( const Rectangle& rDeviceRect ) const;
     997                 :            :     Polygon             PixelToLogic( const Polygon& rDevicePoly ) const;
     998                 :            :     PolyPolygon         PixelToLogic( const PolyPolygon& rDevicePolyPoly ) const;
     999                 :            :     Region              PixelToLogic( const Region& rDeviceRegion ) const;
    1000                 :            :     Point               PixelToLogic( const Point& rDevicePt,
    1001                 :            :                                       const MapMode& rMapMode ) const;
    1002                 :            :     Size                PixelToLogic( const Size& rDeviceSize,
    1003                 :            :                                       const MapMode& rMapMode ) const;
    1004                 :            :     Rectangle           PixelToLogic( const Rectangle& rDeviceRect,
    1005                 :            :                                       const MapMode& rMapMode ) const;
    1006                 :            :     Polygon             PixelToLogic( const Polygon& rDevicePoly,
    1007                 :            :                                       const MapMode& rMapMode ) const;
    1008                 :            :     basegfx::B2DPolygon PixelToLogic( const basegfx::B2DPolygon& rDevicePoly,
    1009                 :            :                                       const MapMode& rMapMode ) const;
    1010                 :            :     basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly,
    1011                 :            :                                           const MapMode& rMapMode ) const;
    1012                 :            :     Point               LogicToLogic( const Point&      rPtSource,
    1013                 :            :                                       const MapMode*    pMapModeSource,
    1014                 :            :                                       const MapMode*    pMapModeDest ) const;
    1015                 :            :     Size                LogicToLogic( const Size&       rSzSource,
    1016                 :            :                                       const MapMode*    pMapModeSource,
    1017                 :            :                                       const MapMode*    pMapModeDest ) const;
    1018                 :            :     Rectangle           LogicToLogic( const Rectangle&  rRectSource,
    1019                 :            :                                       const MapMode*    pMapModeSource,
    1020                 :            :                                       const MapMode*    pMapModeDest ) const;
    1021                 :            :     static Point        LogicToLogic( const Point&      rPtSource,
    1022                 :            :                                       const MapMode&    rMapModeSource,
    1023                 :            :                                       const MapMode&    rMapModeDest );
    1024                 :            :     static Size         LogicToLogic( const Size&       rSzSource,
    1025                 :            :                                       const MapMode&    rMapModeSource,
    1026                 :            :                                       const MapMode&    rMapModeDest );
    1027                 :            :     static Rectangle    LogicToLogic( const Rectangle&  rRectSource,
    1028                 :            :                                       const MapMode&    rMapModeSource,
    1029                 :            :                                       const MapMode&    rMapModeDest );
    1030                 :            :     static long         LogicToLogic( long              nLongSource,
    1031                 :            :                                       MapUnit           eUnitSource,
    1032                 :            :                                       MapUnit           eUnitDest );
    1033                 :            : 
    1034                 :            :     static basegfx::B2DPolygon LogicToLogic( const basegfx::B2DPolygon& rPoly,
    1035                 :            :                                              const MapMode&    rMapModeSource,
    1036                 :            :                                              const MapMode&    rMapModeDest );
    1037                 :            : 
    1038                 :    1027978 :     Size                GetOutputSizePixel() const
    1039                 :    1027978 :                             { return Size( mnOutWidth, mnOutHeight ); }
    1040                 :      61948 :     long                GetOutputWidthPixel() const { return mnOutWidth; }
    1041                 :      40421 :     long                GetOutputHeightPixel() const { return mnOutHeight; }
    1042                 :        682 :     long                GetOutOffXPixel() const { return mnOutOffX; }
    1043                 :      13456 :     long                GetOutOffYPixel() const { return mnOutOffY; }
    1044                 :            : 
    1045                 :      18709 :     Size                GetOutputSize() const
    1046         [ +  - ]:      18709 :                             { return PixelToLogic( GetOutputSizePixel() ); }
    1047                 :            : 
    1048                 :            :     void                Erase();
    1049                 :      22592 :     void                Erase( const Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); }
    1050                 :            : 
    1051                 :            :     sal_Bool                AddTempDevFont( const String& rFileURL, const String& rFontName );
    1052                 :            :     int                 GetDevFontCount() const;
    1053                 :            :     FontInfo            GetDevFont( int nDevFontIndex ) const;
    1054                 :            :     int                 GetDevFontSizeCount( const Font& ) const;
    1055                 :            :     Size                GetDevFontSize( const Font& rFont, int nSizeIndex ) const;
    1056                 :            :     sal_Bool                IsFontAvailable( const String& rFontName ) const;
    1057                 :            : 
    1058                 :            :     FontMetric          GetFontMetric() const;
    1059                 :            :     FontMetric          GetFontMetric( const Font& rFont ) const;
    1060                 :            :     sal_Bool                GetFontCharMap( FontCharMap& rFontCharMap ) const;
    1061                 :            :     bool                GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
    1062                 :            : 
    1063                 :            :     xub_StrLen          HasGlyphs( const Font& rFont, const String& rStr,
    1064                 :            :                             xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN ) const;
    1065                 :            : 
    1066                 :            :     long                GetMinKashida() const;
    1067                 :            : 
    1068                 :            :     // i60594
    1069                 :            :     // validate kashida positions against the current font
    1070                 :            :     // returns count of invalid kashida positions
    1071                 :            :     xub_StrLen          ValidateKashidas ( const String& rTxt,
    1072                 :            :                                             xub_StrLen nIdx, xub_StrLen nLen,
    1073                 :            :                                             xub_StrLen nKashCount, // number of suggested kashida positions (in)
    1074                 :            :                                             const xub_StrLen* pKashidaPos, // suggested kashida positions (in)
    1075                 :            :                                             xub_StrLen* pKashidaPosDropped // invalid kashida positions (out)
    1076                 :            :                                             ) const;
    1077                 :            : 
    1078                 :            :     sal_uInt16              GetBitCount() const;
    1079                 :            : 
    1080                 :            :     sal_Bool                GetTextIsRTL( const String&, xub_StrLen nIndex,
    1081                 :            :                             xub_StrLen nLen ) const;
    1082                 :            : 
    1083                 :            :     /** Query the existence and depth of the alpha channel
    1084                 :            : 
    1085                 :            :         @return 0, if no alpha channel available, and the bit depth of
    1086                 :            :         the alpha channel otherwise.
    1087                 :            :      */
    1088                 :            :     sal_uInt16              GetAlphaBitCount() const;
    1089                 :            :     sal_uLong               GetColorCount() const;
    1090                 :            : 
    1091                 :            :     void                Push( sal_uInt16 nFlags = PUSH_ALL );
    1092                 :            :     void                Pop();
    1093                 :            :     // returns the curren stack depth; that is the number of Push() calls minus the number of Pop() calls
    1094                 :            :     // this should not normally be used since Push and Pop must always be used symmetrically
    1095                 :            :     // however this may be e.g. a help when debugging code in which this somehow is not the case
    1096                 :            :     sal_uInt32          GetGCStackDepth() const;
    1097                 :            : 
    1098                 :            :     /** Query availability of alpha channel
    1099                 :            : 
    1100                 :            :         @return sal_True, if this device has an alpha channel.
    1101                 :            :      */
    1102                 :            :     sal_Bool                HasAlpha();
    1103                 :            : 
    1104                 :            :     /// request XCanvas render interface for this OutputDevice
    1105                 :            :     ::com::sun::star::uno::Reference<
    1106                 :            :         ::com::sun::star::rendering::XCanvas > GetCanvas() const;
    1107                 :            : 
    1108                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >    CreateUnoGraphics();
    1109                 :     253940 :     VCLXGraphicsList_impl*  GetUnoGraphicsList() const  { return mpUnoGraphicsList; }
    1110                 :       2204 :     VCLXGraphicsList_impl*  CreateUnoGraphicsList()
    1111                 :            :                             {
    1112         [ +  - ]:       2204 :                                 mpUnoGraphicsList = new VCLXGraphicsList_impl();
    1113                 :       2204 :                                 return mpUnoGraphicsList;
    1114                 :            :                             }
    1115                 :            : 
    1116                 :            :     static void         BeginFontSubstitution();
    1117                 :            :     static void         EndFontSubstitution();
    1118                 :            :     static void         AddFontSubstitute( const XubString& rFontName,
    1119                 :            :                                            const XubString& rReplaceFontName,
    1120                 :            :                                            sal_uInt16 nFlags = 0 );
    1121                 :            :     static void         RemoveFontSubstitute( sal_uInt16 n );
    1122                 :            :     static sal_uInt16       GetFontSubstituteCount();
    1123                 :            : 
    1124                 :            :     static Font         GetDefaultFont( sal_uInt16 nType,
    1125                 :            :                                         LanguageType eLang,
    1126                 :            :                                         sal_uLong nFlags,
    1127                 :            :                                         const OutputDevice* pOutDev = NULL );
    1128                 :            : 
    1129                 :            :     /** helper method removing transparencies from a metafile (e.g. for printing)
    1130                 :            : 
    1131                 :            :         @returns
    1132                 :            :         true: transparencies were removed
    1133                 :            :         false: output metafile is unchanged input metafile
    1134                 :            : 
    1135                 :            :         @attention this is a member method, so current state can influence the result !
    1136                 :            :         @attention the output metafile is prepared in pixel mode for the currentOutputDevice
    1137                 :            :                    state. It can not be moved or rotated reliably anymore.
    1138                 :            :     */
    1139                 :            :     bool                RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
    1140                 :            :                                                           long nMaxBmpDPIX, long nMaxBmpDPIY,
    1141                 :            :                                                           bool bReduceTransparency,
    1142                 :            :                                                           bool bTransparencyAutoMode,
    1143                 :            :                                                           bool bDownsampleBitmaps,
    1144                 :            :                                                           const Color& rBackground = Color( COL_TRANSPARENT )
    1145                 :            :                                                           );
    1146                 :            :     /** Retrieve downsampled and cropped bitmap
    1147                 :            : 
    1148                 :            :         @attention This method ignores negative rDstSz values, thus
    1149                 :            :         mirroring must happen outside this method (e.g. in DrawBitmap)
    1150                 :            :      */
    1151                 :            :     Bitmap              GetDownsampledBitmap( const Size& rDstSz,
    1152                 :            :                                               const Point& rSrcPt, const Size& rSrcSz,
    1153                 :            :                                               const Bitmap& rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY );
    1154                 :            : 
    1155                 :            :     //-------------------------------------
    1156                 :            :     //  Native Widget Rendering functions
    1157                 :            :     //-------------------------------------
    1158                 :            : 
    1159                 :            :     // These all just call through to the private mpGraphics functions of the same name.
    1160                 :            : 
    1161                 :            :     // Query the platform layer for control support
    1162                 :            :     sal_Bool                IsNativeControlSupported( ControlType nType, ControlPart nPart );
    1163                 :            : 
    1164                 :            :     // Query the native control to determine if it was acted upon
    1165                 :            :     sal_Bool                HitTestNativeControl(   ControlType nType,
    1166                 :            :                                                 ControlPart nPart,
    1167                 :            :                                                 const Rectangle& rControlRegion,
    1168                 :            :                                                 const Point& aPos,
    1169                 :            :                                                 sal_Bool& rIsInside );
    1170                 :            : 
    1171                 :            :     // Request rendering of a particular control and/or part
    1172                 :            :     sal_Bool                DrawNativeControl(  ControlType nType,
    1173                 :            :                                             ControlPart nPart,
    1174                 :            :                                             const Rectangle& rControlRegion,
    1175                 :            :                                             ControlState nState,
    1176                 :            :                                             const ImplControlValue& aValue,
    1177                 :            :                                             ::rtl::OUString aCaption );
    1178                 :            : 
    1179                 :            :     // Query the native control's actual drawing region (including adornment)
    1180                 :            :     sal_Bool                GetNativeControlRegion( ControlType nType,
    1181                 :            :                                                 ControlPart nPart,
    1182                 :            :                                                 const Rectangle& rControlRegion,
    1183                 :            :                                                 ControlState nState,
    1184                 :            :                                                 const ImplControlValue& aValue,
    1185                 :            :                                                 ::rtl::OUString aCaption,
    1186                 :            :                                                 Rectangle &rNativeBoundingRegion,
    1187                 :            :                                                 Rectangle &rNativeContentRegion ) const;
    1188                 :            : 
    1189                 :            : };
    1190                 :            : 
    1191                 :            : #endif // _SV_OUTDEV_HXX
    1192                 :            : 
    1193                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10