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