LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/vcl/inc - salgdi.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 5 80.0 %
Date: 2013-07-09 Functions: 4 5 80.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _SV_SALGDI_HXX
      21             : #define _SV_SALGDI_HXX
      22             : 
      23             : #include "tools/solar.h"
      24             : #include "vcl/dllapi.h"
      25             : #include "vcl/salgtype.hxx"
      26             : #include "osl/thread.hxx"
      27             : #include "vcl/outdev.hxx"
      28             : #include "vcl/salnativewidgets.hxx"
      29             : #include "sallayout.hxx"
      30             : 
      31             : #include <map>
      32             : 
      33             : 
      34             : class ImplDevFontList;
      35             : class SalBitmap;
      36             : class FontSelectPattern;
      37             : class ImplFontMetricData;
      38             : struct ImplKernPairData;
      39             : class PhysicalFontFace;
      40             : class ImplFontCharMap;
      41             : class SalLayout;
      42             : class ImplLayoutArgs;
      43             : class Rectangle;
      44             : class FontSubsetInfo;
      45             : class OutputDevice;
      46             : class ServerFontLayout;
      47             : struct SystemGraphicsData;
      48             : struct SystemFontData;
      49             : 
      50             : namespace basegfx {
      51             :     class B2DVector;
      52             :     class B2DPolygon;
      53             :     class B2DPolyPolygon;
      54             : }
      55             : 
      56             : // ---------------------
      57             : // - SalGraphics-Codes -
      58             : // ---------------------
      59             : 
      60             : #define SAL_SETFONT_REMOVEANDMATCHNEW       ((sal_uInt16)0x0001)
      61             : #define SAL_SETFONT_USEDRAWTEXT             ((sal_uInt16)0x0002)
      62             : #define SAL_SETFONT_USEDRAWTEXTARRAY        ((sal_uInt16)0x0004)
      63             : #define SAL_SETFONT_UNICODE                 ((sal_uInt16)0x0008)
      64             : #define SAL_SETFONT_BADFONT                 ((sal_uInt16)0x1000)
      65             : 
      66             : #define SAL_COPYAREA_WINDOWINVALIDATE       ((sal_uInt16)0x0001)
      67             : 
      68             : typedef sal_Unicode sal_Ucs; // TODO: use sal_UCS4 instead of sal_Unicode
      69             : typedef std::map< sal_Ucs, sal_Int32 >    Ucs2SIntMap;
      70             : typedef std::map< sal_Ucs, sal_uInt32 >   Ucs2UIntMap;
      71             : typedef std::map< sal_Ucs, OString > Ucs2OStrMap;
      72             : typedef std::vector< sal_Int32 > Int32Vector;
      73             : 
      74             : // note: if you add any new methods to class SalGraphics using coordinates
      75             : //       make sure they have a corresponding protected pure virtual method
      76             : //       which has to be implemented by the platform dependent part.
      77             : //       Add a method that performs coordinate mirroring if required, (see
      78             : //       existing methods as sample) and then calls the equivalent pure method.
      79             : 
      80             : // note: all positions are in pixel and relative to
      81             : // the top/left-position of the virtual output area
      82             : 
      83             : class VCL_PLUGIN_PUBLIC SalGraphics
      84             : {
      85             :     int                     m_nLayout; // 0: mirroring off, 1: mirror x-axis
      86             : 
      87             : protected:
      88             :     /// bitfield
      89             :     // flags which hold the SetAntialiasing() value from OutputDevice
      90             :     bool                    m_bAntiAliasB2DDraw : 1;
      91             : 
      92             : public:
      93      145990 :     void                    setAntiAliasB2DDraw(bool bNew) { m_bAntiAliasB2DDraw = bNew; }
      94           0 :     bool                    getAntiAliasB2DDraw() const { return m_bAntiAliasB2DDraw; }
      95             : 
      96             :     SalGraphics();
      97             :     virtual ~SalGraphics();
      98             : 
      99             : protected:
     100             :     virtual bool            setClipRegion( const Region& ) = 0;
     101             : 
     102             :     // draw --> LineColor and FillColor and RasterOp and ClipRegion
     103             :     virtual void            drawPixel( long nX, long nY ) = 0;
     104             :     virtual void            drawPixel( long nX, long nY, SalColor nSalColor ) = 0;
     105             :     virtual void            drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0;
     106             :     virtual void            drawRect( long nX, long nY, long nWidth, long nHeight ) = 0;
     107             :     virtual void            drawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry ) = 0;
     108             :     virtual void            drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry ) = 0;
     109             :     virtual void            drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) = 0;
     110             :     virtual bool            drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ) = 0;
     111             :     virtual bool            drawPolyLine( const ::basegfx::B2DPolygon&,
     112             :                                           double fTransparency,
     113             :                                           const ::basegfx::B2DVector& rLineWidths,
     114             :                                           basegfx::B2DLineJoin,
     115             :                                           com::sun::star::drawing::LineCap) = 0;
     116             :     virtual sal_Bool        drawPolyLineBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0;
     117             :     virtual sal_Bool        drawPolygonBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0;
     118             :     virtual sal_Bool        drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ) = 0;
     119             : 
     120             :     // CopyArea --> No RasterOp, but ClipRegion
     121             :     virtual void            copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
     122             :                                       long nSrcHeight, sal_uInt16 nFlags ) = 0;
     123             : 
     124             :     // CopyBits and DrawBitmap --> RasterOp and ClipRegion
     125             :     // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
     126             :     virtual void        copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) = 0;
     127             :     virtual void        drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) = 0;
     128             :     virtual void        drawBitmap( const SalTwoRect& rPosAry,
     129             :                                     const SalBitmap& rSalBitmap,
     130             :                                     SalColor nTransparentColor ) = 0;
     131             :     virtual void        drawBitmap( const SalTwoRect& rPosAry,
     132             :                                     const SalBitmap& rSalBitmap,
     133             :                                     const SalBitmap& rMaskBitmap ) = 0;
     134             :     virtual void        drawMask( const SalTwoRect& rPosAry,
     135             :                                   const SalBitmap& rSalBitmap,
     136             :                                   SalColor nMaskColor ) = 0;
     137             : 
     138             :     virtual SalBitmap*  getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0;
     139             :     virtual SalColor    getPixel( long nX, long nY ) = 0;
     140             : 
     141             :     // invert --> ClipRegion (only Windows or VirDevs)
     142             :     virtual void            invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0;
     143             :     virtual void            invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0;
     144             : 
     145             :     virtual sal_Bool        drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) = 0;
     146             : 
     147             :     // native widget rendering methods that require mirroring
     148             :     virtual sal_Bool        hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
     149             :                                                   const Point& aPos, sal_Bool& rIsInside );
     150             :     virtual sal_Bool        drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
     151             :                                                ControlState nState, const ImplControlValue& aValue,
     152             :                                                const OUString& aCaption );
     153             :     virtual sal_Bool        getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
     154             :                                                     const ImplControlValue& aValue, const OUString& aCaption,
     155             :                                                     Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
     156             : 
     157             :     /** Render bitmap with alpha channel
     158             : 
     159             :         @param rSourceBitmap
     160             :         Source bitmap to blit
     161             : 
     162             :         @param rAlphaBitmap
     163             :         Alpha channel to use for blitting
     164             : 
     165             :         @return true, if the operation succeeded, and false
     166             :         otherwise. In this case, clients should try to emulate alpha
     167             :         compositing themselves
     168             :      */
     169             :     virtual bool        drawAlphaBitmap( const SalTwoRect&,
     170             :                                          const SalBitmap& rSourceBitmap,
     171             :                                          const SalBitmap& rAlphaBitmap ) = 0;
     172             : 
     173             :     /** draw transformed bitmap (maybe with alpha) where Null, X, Y define the coordinate system */
     174             :     virtual bool drawTransformedBitmap(
     175             :         const basegfx::B2DPoint& rNull,
     176             :         const basegfx::B2DPoint& rX,
     177             :         const basegfx::B2DPoint& rY,
     178             :         const SalBitmap& rSourceBitmap,
     179             :         const SalBitmap* pAlphaBitmap) = 0;
     180             : 
     181             :     /** Render solid rectangle with given transparency
     182             : 
     183             :         @param nTransparency
     184             :         Transparency value (0-255) to use. 0 blits and opaque, 255 a
     185             :         fully transparent rectangle
     186             :      */
     187             :     virtual bool            drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) = 0;
     188             : 
     189             : public:
     190             :     // public SalGraphics methods, the interface to the independent vcl part
     191             : 
     192             :     // get device resolution
     193             :     virtual void            GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0;
     194             : 
     195             :     // get the depth of the device
     196             :     virtual sal_uInt16      GetBitCount() const = 0;
     197             : 
     198             :     // get the width of the device
     199             :     virtual long            GetGraphicsWidth() const = 0;
     200             : 
     201             :     // set the clip region to empty
     202             :     virtual void            ResetClipRegion() = 0;
     203             : 
     204             :     // set the line color to transparent (= don't draw lines)
     205             : 
     206             :     virtual void            SetLineColor() = 0;
     207             : 
     208             :     // set the line color to a specific color
     209             :     virtual void            SetLineColor( SalColor nSalColor ) = 0;
     210             : 
     211             :     // set the fill color to transparent (= don't fill)
     212             :     virtual void            SetFillColor() = 0;
     213             : 
     214             :     // set the fill color to a specific color, shapes will be
     215             :     // filled accordingly
     216             :     virtual void            SetFillColor( SalColor nSalColor ) = 0;
     217             : 
     218             :     // enable/disable XOR drawing
     219             :     virtual void            SetXORMode( bool bSet, bool bInvertOnly ) = 0;
     220             : 
     221             :     // set line color for raster operations
     222             :     virtual void            SetROPLineColor( SalROPColor nROPColor ) = 0;
     223             : 
     224             :     // set fill color for raster operations
     225             :     virtual void            SetROPFillColor( SalROPColor nROPColor ) = 0;
     226             : 
     227             :     // set the text color to a specific color
     228             :     virtual void            SetTextColor( SalColor nSalColor ) = 0;
     229             : 
     230             :     // set the font
     231             :     virtual sal_uInt16      SetFont( FontSelectPattern*, int nFallbackLevel ) = 0;
     232             : 
     233             :     // release the fonts
     234      145652 :     void                    ReleaseFonts() { SetFont( NULL, 0 ); }
     235             : 
     236             :     // get the current font's metrics
     237             :     virtual void            GetFontMetric( ImplFontMetricData*, int nFallbackLevel = 0 ) = 0;
     238             : 
     239             :     // get kerning pairs of the current font
     240             :     // return only PairCount if (pKernPairs == NULL)
     241             :     virtual sal_uLong       GetKernPairs( sal_uLong nMaxPairCount, ImplKernPairData* ) = 0;
     242             : 
     243             :     // get the repertoire of the current font
     244             :     virtual const ImplFontCharMap*
     245             :                             GetImplFontCharMap() const = 0;
     246             : 
     247             :     // get the layout capabilities of the current font
     248             :     virtual bool            GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const = 0;
     249             : 
     250             :     // graphics must fill supplied font list
     251             :     virtual void            GetDevFontList( ImplDevFontList* ) = 0;
     252             : 
     253             :     // graphics must drop any cached font info
     254             :     virtual void            ClearDevFontCache() = 0;
     255             : 
     256             :     // graphics should call ImplAddDevFontSubstitute on supplied
     257             :     // OutputDevice for all its device specific preferred font substitutions
     258             :     virtual void            GetDevFontSubstList( OutputDevice* ) = 0;
     259             : 
     260             :     virtual bool            AddTempDevFont( ImplDevFontList*, const OUString& rFileURL, const OUString& rFontName ) = 0;
     261             : 
     262             :     // CreateFontSubset: a method to get a subset of glyhps of a font
     263             :     // inside a new valid font file
     264             :     // returns sal_True if creation of subset was successful
     265             :     // parameters: rToFile: contains a osl file URL to write the subset to
     266             :     //             pFont: describes from which font to create a subset
     267             :     //             pGlyphIDs: the glyph ids to be extracted
     268             :     //             pEncoding: the character code corresponding to each glyph
     269             :     //             pWidths: the advance widths of the correspoding glyphs (in PS font units)
     270             :     //             nGlyphs: the number of glyphs
     271             :     //             rInfo: additional outgoing information
     272             :     // implementation note: encoding 0 with glyph id 0 should be added implicitly
     273             :     // as "undefined character"
     274             :     virtual sal_Bool        CreateFontSubset( const OUString& rToFile,
     275             :                                               const PhysicalFontFace* pFont,
     276             :                                               sal_Int32* pGlyphIDs,
     277             :                                               sal_uInt8* pEncoding,
     278             :                                               sal_Int32* pWidths,
     279             :                                               int nGlyphs,
     280             :                                               FontSubsetInfo& rInfo ) = 0;
     281             : 
     282             :     // GetFontEncodingVector: a method to get the encoding map Unicode
     283             :     // to font encoded character; this is only used for type1 fonts and
     284             :     // may return NULL in case of unknown encoding vector
     285             :     // if ppNonEncoded is set and non encoded characters (that is type1
     286             :     // glyphs with only a name) exist it is set to the corresponding
     287             :     // map for non encoded glyphs; the encoding vector contains -1
     288             :     // as encoding for these cases
     289             :     virtual const Ucs2SIntMap*
     290             :                             GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded ) = 0;
     291             : 
     292             :     // GetEmbedFontData: gets the font data for a font marked
     293             :     // embeddable by GetDevFontList or NULL in case of error
     294             :     // parameters: pFont: describes the font in question
     295             :     //             pUnicodes: contains the Unicodes assigned to
     296             :     //             code points 0 to 255; must contain at least 256 members
     297             :     //             pWidths: the widths of all glyphs from char code 0 to 255
     298             :     //                      pWidths MUST support at least 256 members;
     299             :     //             rInfo: additional outgoing information
     300             :     //             pDataLen: out parameter, contains the byte length of the returned buffer
     301             :     virtual const void*     GetEmbedFontData( const PhysicalFontFace* pFont,
     302             :                                               const sal_Ucs* pUnicodes,
     303             :                                               sal_Int32* pWidths,
     304             :                                               FontSubsetInfo& rInfo,
     305             :                                               long* pDataLen ) = 0;
     306             :     // free the font data again
     307             :     virtual void            FreeEmbedFontData( const void* pData, long nDataLen ) = 0;
     308             : 
     309             :     // get the same widths as in CreateFontSubset and GetEmbedFontData
     310             :     // in case of an embeddable font also fill the mapping
     311             :     // between unicode and glyph id
     312             :     // leave widths vector and mapping untouched in case of failure
     313             :     virtual void            GetGlyphWidths( const PhysicalFontFace* pFont,
     314             :                                             bool bVertical,
     315             :                                             Int32Vector& rWidths,
     316             :                                             Ucs2UIntMap& rUnicodeEnc ) = 0;
     317             : 
     318             :     virtual sal_Bool        GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& ) = 0;
     319             :     virtual sal_Bool        GetGlyphOutline( sal_GlyphId nIndex, basegfx::B2DPolyPolygon& ) = 0;
     320             : 
     321             :     virtual SalLayout*      GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0;
     322             :     virtual void            DrawServerFontLayout( const ServerFontLayout& ) = 0;
     323             : 
     324             :     /** Filter text from DrawText commands in a device specific manner
     325             :         <p>
     326             :         This function allows a device (or rather the corresponding SalGraphics
     327             :         implementation) to prevent text portions from being drawn. This currently
     328             :         is used only for filtering out the fax number in a document that is printed
     329             :         to one of psprint's specialized "fax" printers.
     330             :         </p>
     331             : 
     332             :         @param rOrigText
     333             :         The original text
     334             : 
     335             :         @param rNewText
     336             :         A String that will be filled with the adjusted version
     337             : 
     338             :         @param nIndex
     339             :         The index inside <code>rOrigText</code> that marks the first draw character
     340             : 
     341             :         @param rLen
     342             :         in: length of text beginning at <code>nIndex</code> to be drawn
     343             :         out: length of <code>rNewText</code> containing the substituted text
     344             : 
     345             :         @param rCutStart
     346             :         out: index at which the cutout portion of <code>rOrigText</code> begins
     347             : 
     348             :         @param rCutStop
     349             :         out: index at which the cutout portion of <code>rOrigText</code> ends
     350             : 
     351             :         @returns
     352             :         true: a substitution has taken place and rNewText rLen, rCutStart and rCutStop have been filled accordingly
     353             :         false: no substitution has taken place, rNewText, rLen, rCutStart, rCutStop remain unchanged
     354             :      */
     355             :     virtual bool            filterText( const OUString& rOrigText, OUString& rNewText,
     356             :                                         sal_Int32 nIndex, sal_Int32& rLen, sal_Int32& rCutStart, sal_Int32& rCutStop );
     357             : 
     358             :     virtual bool            supportsOperation( OutDevSupportType ) const = 0;
     359             : 
     360             :     // mirroring specifica
     361      855738 :     int                     GetLayout() { return m_nLayout; }
     362       15012 :     void                    SetLayout( int aLayout ) { m_nLayout = aLayout;}
     363             : 
     364             :     void                    mirror( long& nX, const OutputDevice *pOutDev, bool bBack = false ) const;
     365             :     void                    mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
     366             :     sal_Bool                mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const;
     367             :     void                    mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const;
     368             :     void                    mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack = false ) const;
     369             :     void                    mirror( ImplControlValue&, const OutputDevice*, bool bBack = false ) const;
     370             :     basegfx::B2DPoint       mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev, bool bBack = false ) const;
     371             :     basegfx::B2DPolygon     mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const;
     372             :     basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const;
     373             : 
     374             :     // non virtual methods; these do possible coordinate mirroring and
     375             :     // then delegate to protected virtual methods
     376             :     bool                    SetClipRegion( const Region&, const OutputDevice *pOutDev );
     377             : 
     378             :     // draw --> LineColor and FillColor and RasterOp and ClipRegion
     379             :     void                    DrawPixel( long nX, long nY, const OutputDevice *pOutDev );
     380             :     void                    DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev );
     381             :     void                    DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev );
     382             :     void                    DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev );
     383             :     void                    DrawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev );
     384             :     void                    DrawPolygon( sal_uLong nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev );
     385             :     void                    DrawPolyPolygon( sal_uInt32 nPoly,
     386             :                                              const sal_uInt32* pPoints,
     387             :                                              PCONSTSALPOINT* pPtAry,
     388             :                                              const OutputDevice *pOutDev );
     389             :     bool                    DrawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency, const OutputDevice* );
     390             : 
     391             :     bool                    DrawPolyLine( const basegfx::B2DPolygon& i_rPolygon,
     392             :                                           double i_fTransparency,
     393             :                                           const basegfx::B2DVector& i_rLineWidth,
     394             :                                           basegfx::B2DLineJoin i_eLineJoin,
     395             :                                           com::sun::star::drawing::LineCap i_eLineCap,
     396             :                                           const OutputDevice* i_pOutDev);
     397             : 
     398             :     sal_Bool                DrawPolyLineBezier( sal_uLong nPoints,
     399             :                                                 const SalPoint* pPtAry,
     400             :                                                 const sal_uInt8* pFlgAry,
     401             :                                                 const OutputDevice *pOutDev );
     402             :     sal_Bool                DrawPolygonBezier( sal_uLong nPoints,
     403             :                                                const SalPoint* pPtAry,
     404             :                                                const sal_uInt8* pFlgAry,
     405             :                                                const OutputDevice *pOutDev );
     406             :     sal_Bool                DrawPolyPolygonBezier( sal_uInt32 nPoly,
     407             :                                                    const sal_uInt32* pPoints,
     408             :                                                    const SalPoint* const* pPtAry,
     409             :                                                    const sal_uInt8* const* pFlgAry,
     410             :                                                    const OutputDevice *pOutDev );
     411             : 
     412             :     // CopyArea --> No RasterOp, but ClipRegion
     413             :     void                    CopyArea( long nDestX, long nDestY,
     414             :                                       long nSrcX, long nSrcY,
     415             :                                       long nSrcWidth, long nSrcHeight,
     416             :                                       sal_uInt16 nFlags,
     417             :                                       const OutputDevice *pOutDev );
     418             : 
     419             :     // CopyBits and DrawBitmap --> RasterOp and ClipRegion
     420             :     // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
     421             :     void                    CopyBits( const SalTwoRect& rPosAry,
     422             :                                       SalGraphics* pSrcGraphics,
     423             :                                       const OutputDevice *pOutDev,
     424             :                                       const OutputDevice *pSrcOutDev );
     425             :     void                    DrawBitmap( const SalTwoRect& rPosAry,
     426             :                                         const SalBitmap& rSalBitmap,
     427             :                                         const OutputDevice *pOutDev );
     428             :     void                    DrawBitmap( const SalTwoRect& rPosAry,
     429             :                                         const SalBitmap& rSalBitmap,
     430             :                                         const SalBitmap& rTransparentBitmap,
     431             :                                         const OutputDevice *pOutDev );
     432             : 
     433             :     void                    DrawMask( const SalTwoRect& rPosAry,
     434             :                                       const SalBitmap& rSalBitmap,
     435             :                                       SalColor nMaskColor,
     436             :                                       const OutputDevice *pOutDev );
     437             : 
     438             :     SalBitmap*              GetBitmap( long nX, long nY,
     439             :                                        long nWidth, long nHeight,
     440             :                                        const OutputDevice *pOutDev );
     441             : 
     442             :     SalColor                GetPixel( long nX, long nY,
     443             :                                       const OutputDevice *pOutDev );
     444             : 
     445             :     // invert --> ClipRegion (only Windows)
     446             :     void                    Invert( long nX, long nY,
     447             :                                     long nWidth, long nHeight,
     448             :                                     SalInvert nFlags,
     449             :                                     const OutputDevice *pOutDev );
     450             : 
     451             :     void                    Invert( sal_uLong nPoints,
     452             :                                     const SalPoint* pPtAry,
     453             :                                     SalInvert nFlags,
     454             :                                     const OutputDevice *pOutDev );
     455             : 
     456             :     sal_Bool                DrawEPS( long nX, long nY,
     457             :                                      long nWidth, long nHeight,
     458             :                                      void* pPtr,
     459             :                                      sal_uLong nSize,
     460             :                                      const OutputDevice *pOutDev );
     461             : 
     462             :     //  native widget rendering functions
     463             : 
     464             :     // Query the platform layer for control support
     465             :     virtual sal_Bool        IsNativeControlSupported( ControlType nType, ControlPart nPart );
     466             : 
     467             :     // Query the native control to determine if it was acted upon
     468             :     sal_Bool                HitTestNativeControl( ControlType nType,
     469             :                                                   ControlPart nPart,
     470             :                                                   const Rectangle& rControlRegion,
     471             :                                                   const Point& aPos,
     472             :                                                   sal_Bool& rIsInside,
     473             :                                                   const OutputDevice *pOutDev );
     474             : 
     475             :     // Request rendering of a particular control and/or part
     476             :     sal_Bool                DrawNativeControl( ControlType nType,
     477             :                                                ControlPart nPart,
     478             :                                                const Rectangle& rControlRegion,
     479             :                                                ControlState nState,
     480             :                                                const ImplControlValue& aValue,
     481             :                                                const OUString& aCaption,
     482             :                                                const OutputDevice *pOutDev );
     483             : 
     484             :     // Query the native control's actual drawing region (including adornment)
     485             :     sal_Bool                GetNativeControlRegion( ControlType nType,
     486             :                                                     ControlPart nPart,
     487             :                                                     const Rectangle& rControlRegion,
     488             :                                                     ControlState nState,
     489             :                                                     const ImplControlValue& aValue,
     490             :                                                     const OUString& aCaption,
     491             :                                                     Rectangle &rNativeBoundingRegion,
     492             :                                                     Rectangle &rNativeContentRegion,
     493             :                                                     const OutputDevice *pOutDev );
     494             : 
     495             :     bool                    DrawAlphaBitmap( const SalTwoRect&,
     496             :                                              const SalBitmap& rSourceBitmap,
     497             :                                              const SalBitmap& rAlphaBitmap,
     498             :                                              const OutputDevice *pOutDev );
     499             : 
     500             :     bool DrawTransformedBitmap(
     501             :         const basegfx::B2DPoint& rNull,
     502             :         const basegfx::B2DPoint& rX,
     503             :         const basegfx::B2DPoint& rY,
     504             :         const SalBitmap& rSourceBitmap,
     505             :         const SalBitmap* pAlphaBitmap,
     506             :         const OutputDevice* pOutDev );
     507             : 
     508             :     bool                    DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
     509             :                                            sal_uInt8 nTransparency, const OutputDevice *pOutDev );
     510             : 
     511             :     virtual SystemGraphicsData
     512             :                             GetGraphicsData() const = 0;
     513             : 
     514             :     virtual SystemFontData  GetSysFontData( int nFallbacklevel ) const = 0;
     515             : };
     516             : 
     517             : #endif // _SV_SALGDI_HXX
     518             : 
     519             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10