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

Generated by: LCOV version 1.11