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

Generated by: LCOV version 1.10