LCOV - code coverage report
Current view: top level - vcl/inc - salgdi.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 5 80.0 %
Date: 2012-08-25 Functions: 4 5 80.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

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

Generated by: LCOV version 1.10