xref: /aoo41x/main/vcl/unx/headless/svpgdi.cxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #include "svpgdi.hxx"
29 #include "svpbmp.hxx"
30 
31 #include <vcl/sysdata.hxx>
32 #include <basegfx/range/b2drange.hxx>
33 #include <basegfx/range/b2irange.hxx>
34 #include <basegfx/polygon/b2dpolypolygon.hxx>
35 #include <basegfx/polygon/b2dpolygon.hxx>
36 #include <basegfx/polygon/b2dpolygontools.hxx>
37 #include <basebmp/scanlineformats.hxx>
38 
39 #include <tools/debug.hxx>
40 
41 #if OSL_DEBUG_LEVEL > 2
42 #include <basebmp/debug.hxx>
43 #include <fstream>
44 #include <rtl/strbuf.hxx>
45 #include <sys/stat.h>
46 #endif
47 
48 #include <svppspgraphics.hxx>
49 #include <region.h>
50 
51 using namespace basegfx;
52 using namespace basebmp;
53 
54 inline void dbgOut( const BitmapDeviceSharedPtr&
55 #if OSL_DEBUG_LEVEL > 2
56 rDevice
57 #endif
58 )
59 {
60     #if OSL_DEBUG_LEVEL > 2
61     static int dbgStreamNum = 0;
62     rtl::OStringBuffer aBuf( 256 );
63     aBuf.append( "debug" );
64     mkdir( aBuf.getStr(), 0777 );
65     aBuf.append( "/" );
66     aBuf.append( sal_Int64(reinterpret_cast<sal_uInt32>(rDevice.get())), 16 );
67     mkdir( aBuf.getStr(), 0777 );
68     aBuf.append( "/bmp" );
69     aBuf.append( sal_Int32(dbgStreamNum++) );
70     std::fstream bmpstream( aBuf.getStr(), std::ios::out );
71     debugDump( rDevice, bmpstream );
72     #endif
73 }
74 
75 // ===========================================================================
76 
77 bool SvpSalGraphics::drawAlphaBitmap( const SalTwoRect&, const SalBitmap& /*rSourceBitmap*/, const SalBitmap& /*rAlphaBitmap*/ )
78 {
79 	// TODO(P3) implement alpha blending
80 	return false;
81 }
82 
83 bool SvpSalGraphics::drawAlphaRect( long /*nX*/, long /*nY*/, long /*nWidth*/, long /*nHeight*/, sal_uInt8 /*nTransparency*/ )
84 {
85 	// TODO(P3) implement alpha blending
86 	return false;
87 }
88 
89 SvpSalGraphics::SvpSalGraphics() :
90     m_bUseLineColor( true ),
91     m_aLineColor( COL_BLACK ),
92     m_bUseFillColor( false ),
93     m_aFillColor( COL_WHITE ),
94     m_aTextColor( COL_BLACK ),
95     m_aDrawMode( DrawMode_PAINT ),
96     m_eTextFmt( Format::EIGHT_BIT_GREY )
97 {
98     for( int i = 0; i < MAX_FALLBACK; ++i )
99         m_pServerFont[i] = NULL;
100 }
101 
102 SvpSalGraphics::~SvpSalGraphics()
103 {
104 }
105 
106 void SvpSalGraphics::setDevice( BitmapDeviceSharedPtr& rDevice )
107 {
108     m_aDevice = rDevice;
109     m_aOrigDevice = rDevice;
110     m_aClipMap.reset();
111 
112     // determine matching bitmap format for masks
113     sal_uInt32 nDeviceFmt = m_aDevice->getScanlineFormat();
114     DBG_ASSERT( (nDeviceFmt <= (sal_uInt32)Format::MAX), "SVP::setDevice() with invalid bitmap format" );
115     switch( nDeviceFmt )
116     {
117         case Format::EIGHT_BIT_GREY:
118         case Format::SIXTEEN_BIT_LSB_TC_MASK:
119         case Format::SIXTEEN_BIT_MSB_TC_MASK:
120         case Format::TWENTYFOUR_BIT_TC_MASK:
121         case Format::THIRTYTWO_BIT_TC_MASK:
122             m_eTextFmt = Format::EIGHT_BIT_GREY;
123             break;
124         default:
125             m_eTextFmt = Format::ONE_BIT_LSB_GREY;
126             break;
127     }
128 }
129 
130 void SvpSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
131 {
132     rDPIX = rDPIY = 96;
133 }
134 
135 sal_uInt16 SvpSalGraphics::GetBitCount()
136 {
137     return SvpElement::getBitCountFromScanlineFormat( m_aDevice->getScanlineFormat() );
138 }
139 
140 long SvpSalGraphics::GetGraphicsWidth() const
141 {
142     if( m_aDevice.get() )
143     {
144         B2IVector aSize = m_aDevice->getSize();
145         return aSize.getX();
146     }
147     return 0;
148 }
149 
150 void SvpSalGraphics::ResetClipRegion()
151 {
152     m_aDevice = m_aOrigDevice;
153     m_aClipMap.reset();
154 }
155 
156 bool SvpSalGraphics::setClipRegion( const Region& i_rClip )
157 {
158     if( i_rClip.IsEmpty() )
159         m_aClipMap.reset();
160     else if( i_rClip.GetRectCount() == 1 )
161     {
162         m_aClipMap.reset();
163         Rectangle aBoundRect( i_rClip.GetBoundRect() );
164         m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice,
165                                                  basegfx::B2IRange(aBoundRect.Left(),aBoundRect.Top(),aBoundRect.Right(),aBoundRect.Bottom()) );
166     }
167     else
168     {
169         m_aDevice = m_aOrigDevice;
170         B2IVector aSize = m_aDevice->getSize();
171         m_aClipMap = createBitmapDevice( aSize, false, Format::ONE_BIT_MSB_GREY );
172         m_aClipMap->clear( basebmp::Color(0xFFFFFFFF) );
173 
174         ImplRegionInfo aInfo;
175         long nX, nY, nW, nH;
176         bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
177         while( bRegionRect )
178         {
179             if ( nW && nH )
180             {
181                 B2DPolyPolygon aFull;
182                 aFull.append( tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nW, nY+nH ) ) );
183                 m_aClipMap->fillPolyPolygon( aFull, basebmp::Color(0), DrawMode_PAINT );
184             }
185             bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
186         }
187     }
188     return true;
189 }
190 
191 void SvpSalGraphics::SetLineColor()
192 {
193     m_bUseLineColor = false;
194 }
195 
196 void SvpSalGraphics::SetLineColor( SalColor nSalColor )
197 {
198     m_bUseLineColor = true;
199     m_aLineColor = basebmp::Color( nSalColor );
200 }
201 
202 void SvpSalGraphics::SetFillColor()
203 {
204     m_bUseFillColor = false;
205 }
206 
207 void SvpSalGraphics::SetFillColor( SalColor nSalColor )
208 {
209     m_bUseFillColor = true;
210     m_aFillColor = basebmp::Color( nSalColor );
211 }
212 
213 void SvpSalGraphics::SetXORMode( bool bSet, bool )
214 {
215     m_aDrawMode = bSet ? DrawMode_XOR : DrawMode_PAINT;
216 }
217 
218 void SvpSalGraphics::SetROPLineColor( SalROPColor nROPColor )
219 {
220     m_bUseLineColor = true;
221     switch( nROPColor )
222     {
223         case SAL_ROP_0:
224             m_aLineColor = basebmp::Color( 0 );
225             break;
226         case SAL_ROP_1:
227             m_aLineColor = basebmp::Color( 0xffffff );
228             break;
229         case SAL_ROP_INVERT:
230             m_aLineColor = basebmp::Color( 0xffffff );
231             break;
232     }
233 }
234 
235 void SvpSalGraphics::SetROPFillColor( SalROPColor nROPColor )
236 {
237     m_bUseFillColor = true;
238     switch( nROPColor )
239     {
240         case SAL_ROP_0:
241             m_aFillColor = basebmp::Color( 0 );
242             break;
243         case SAL_ROP_1:
244             m_aFillColor = basebmp::Color( 0xffffff );
245             break;
246         case SAL_ROP_INVERT:
247             m_aFillColor = basebmp::Color( 0xffffff );
248             break;
249     }
250 }
251 
252 void SvpSalGraphics::SetTextColor( SalColor nSalColor )
253 {
254     m_aTextColor = basebmp::Color( nSalColor );
255 }
256 
257 void SvpSalGraphics::drawPixel( long nX, long nY )
258 {
259     if( m_bUseLineColor )
260         m_aDevice->setPixel( B2IPoint( nX, nY ),
261                              m_aLineColor,
262                              m_aDrawMode,
263                              m_aClipMap
264                              );
265     dbgOut( m_aDevice );
266 }
267 
268 void SvpSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
269 {
270     basebmp::Color aColor( nSalColor );
271     m_aDevice->setPixel( B2IPoint( nX, nY ),
272                          aColor,
273                          m_aDrawMode,
274                          m_aClipMap
275                          );
276     dbgOut( m_aDevice );
277 }
278 
279 void SvpSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
280 {
281     if( m_bUseLineColor )
282         m_aDevice->drawLine( B2IPoint( nX1, nY1 ),
283                              B2IPoint( nX2, nY2 ),
284                              m_aLineColor,
285                              m_aDrawMode,
286                              m_aClipMap );
287     dbgOut( m_aDevice );
288 }
289 
290 void SvpSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
291 {
292     if( m_bUseLineColor || m_bUseFillColor )
293     {
294         B2DPolygon aRect = tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nWidth, nY+nHeight ) );
295         if( m_bUseFillColor )
296         {
297             B2DPolyPolygon aPolyPoly( aRect );
298             m_aDevice->fillPolyPolygon( aPolyPoly, m_aFillColor, m_aDrawMode, m_aClipMap );
299         }
300         if( m_bUseLineColor )
301             m_aDevice->drawPolygon( aRect, m_aLineColor, m_aDrawMode, m_aClipMap );
302     }
303     dbgOut( m_aDevice );
304 }
305 
306 void SvpSalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry )
307 {
308     if( m_bUseLineColor && nPoints )
309     {
310         B2DPolygon aPoly;
311         aPoly.append( B2DPoint( pPtAry->mnX, pPtAry->mnY ), nPoints );
312         for( sal_uLong i = 1; i < nPoints; i++ )
313             aPoly.setB2DPoint( i, B2DPoint( pPtAry[i].mnX, pPtAry[i].mnY ) );
314         aPoly.setClosed( false );
315         m_aDevice->drawPolygon( aPoly, m_aLineColor, m_aDrawMode, m_aClipMap );
316     }
317     dbgOut( m_aDevice );
318 }
319 
320 void SvpSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry )
321 {
322     if( ( m_bUseLineColor || m_bUseFillColor ) && nPoints )
323     {
324         B2DPolygon aPoly;
325         aPoly.append( B2DPoint( pPtAry->mnX, pPtAry->mnY ), nPoints );
326         for( sal_uLong i = 1; i < nPoints; i++ )
327             aPoly.setB2DPoint( i, B2DPoint( pPtAry[i].mnX, pPtAry[i].mnY ) );
328         if( m_bUseFillColor )
329         {
330             aPoly.setClosed( true );
331             m_aDevice->fillPolyPolygon( B2DPolyPolygon(aPoly), m_aFillColor, m_aDrawMode, m_aClipMap );
332         }
333         if( m_bUseLineColor )
334         {
335             aPoly.setClosed( false );
336             m_aDevice->drawPolygon( aPoly, m_aLineColor, m_aDrawMode, m_aClipMap );
337         }
338     }
339     dbgOut( m_aDevice );
340 }
341 
342 void SvpSalGraphics::drawPolyPolygon( sal_uInt32        nPoly,
343                                       const sal_uInt32* pPointCounts,
344                                       PCONSTSALPOINT*   pPtAry )
345 {
346     if( ( m_bUseLineColor || m_bUseFillColor ) && nPoly )
347     {
348         B2DPolyPolygon aPolyPoly;
349         for( sal_uInt32 nPolygon = 0; nPolygon < nPoly; nPolygon++ )
350         {
351             sal_uInt32 nPoints = pPointCounts[nPolygon];
352             if( nPoints )
353             {
354                 PCONSTSALPOINT pPoints = pPtAry[nPolygon];
355                 B2DPolygon aPoly;
356                 aPoly.append( B2DPoint( pPoints->mnX, pPoints->mnY ), nPoints );
357                 for( sal_uInt32 i = 1; i < nPoints; i++ )
358                     aPoly.setB2DPoint( i, B2DPoint( pPoints[i].mnX, pPoints[i].mnY ) );
359 
360                 aPolyPoly.append( aPoly );
361             }
362         }
363         if( m_bUseFillColor )
364         {
365             aPolyPoly.setClosed( true );
366             m_aDevice->fillPolyPolygon( aPolyPoly, m_aFillColor, m_aDrawMode, m_aClipMap );
367         }
368         if( m_bUseLineColor )
369         {
370             aPolyPoly.setClosed( false );
371             nPoly = aPolyPoly.count();
372             for( sal_uInt32 i = 0; i < nPoly; i++ )
373                 m_aDevice->drawPolygon( aPolyPoly.getB2DPolygon(i), m_aLineColor, m_aDrawMode, m_aClipMap );
374         }
375     }
376     dbgOut( m_aDevice );
377 }
378 
379 bool SvpSalGraphics::drawPolyLine( const ::basegfx::B2DPolygon&, double /*fTransparency*/, const ::basegfx::B2DVector& /*rLineWidths*/, basegfx::B2DLineJoin /*eJoin*/ )
380 {
381         // TODO: implement and advertise OutDevSupport_B2DDraw support
382         return false;
383 }
384 
385 sal_Bool SvpSalGraphics::drawPolyLineBezier( sal_uLong,
386                                              const SalPoint*,
387                                              const sal_uInt8* )
388 {
389     return sal_False;
390 }
391 
392 sal_Bool SvpSalGraphics::drawPolygonBezier( sal_uLong,
393                                             const SalPoint*,
394                                             const sal_uInt8* )
395 {
396     return sal_False;
397 }
398 
399 sal_Bool SvpSalGraphics::drawPolyPolygonBezier( sal_uInt32,
400                                                 const sal_uInt32*,
401                                                 const SalPoint* const*,
402                                                 const sal_uInt8* const* )
403 {
404     return sal_False;
405 }
406 
407 bool SvpSalGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon&, double /*fTransparency*/ )
408 {
409     // TODO: maybe BaseBmp can draw B2DPolyPolygons directly
410     return false;
411 }
412 
413 void SvpSalGraphics::copyArea( long nDestX,
414                                       long nDestY,
415                                       long nSrcX,
416                                       long nSrcY,
417                                       long nSrcWidth,
418                                       long nSrcHeight,
419                                       sal_uInt16 /*nFlags*/ )
420 {
421     B2IRange aSrcRect( nSrcX, nSrcY, nSrcX+nSrcWidth, nSrcY+nSrcHeight );
422     B2IRange aDestRect( nDestX, nDestY, nDestX+nSrcWidth, nDestY+nSrcHeight );
423     m_aDevice->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
424     dbgOut( m_aDevice );
425 }
426 
427 void SvpSalGraphics::copyBits( const SalTwoRect* pPosAry,
428                                SalGraphics*      pSrcGraphics )
429 {
430     SvpSalGraphics* pSrc = pSrcGraphics ?
431         static_cast<SvpSalGraphics*>(pSrcGraphics) : this;
432     B2IRange aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
433                        pPosAry->mnSrcX+pPosAry->mnSrcWidth,
434                        pPosAry->mnSrcY+pPosAry->mnSrcHeight );
435     B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
436                         pPosAry->mnDestX+pPosAry->mnDestWidth,
437                         pPosAry->mnDestY+pPosAry->mnDestHeight );
438     m_aDevice->drawBitmap( pSrc->m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
439     dbgOut( m_aDevice );
440 }
441 
442 void SvpSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
443                                         const SalBitmap& rSalBitmap )
444 {
445     const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSalBitmap);
446     B2IRange aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
447                        pPosAry->mnSrcX+pPosAry->mnSrcWidth,
448                        pPosAry->mnSrcY+pPosAry->mnSrcHeight );
449     B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
450                         pPosAry->mnDestX+pPosAry->mnDestWidth,
451                         pPosAry->mnDestY+pPosAry->mnDestHeight );
452     m_aDevice->drawBitmap( rSrc.getBitmap(), aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
453     dbgOut( m_aDevice );
454 }
455 
456 void SvpSalGraphics::drawBitmap( const SalTwoRect*,
457                                  const SalBitmap&,
458                                  SalColor )
459 {
460     // SNI, as in X11 plugin
461 }
462 
463 void SvpSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
464                                  const SalBitmap& rSalBitmap,
465                                  const SalBitmap& rTransparentBitmap )
466 {
467     const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSalBitmap);
468     const SvpSalBitmap& rSrcTrans = static_cast<const SvpSalBitmap&>(rTransparentBitmap);
469     B2IRange aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
470                        pPosAry->mnSrcX+pPosAry->mnSrcWidth,
471                        pPosAry->mnSrcY+pPosAry->mnSrcHeight );
472     B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
473                         pPosAry->mnDestX+pPosAry->mnDestWidth,
474                         pPosAry->mnDestY+pPosAry->mnDestHeight );
475     m_aDevice->drawMaskedBitmap( rSrc.getBitmap(), rSrcTrans.getBitmap(), aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
476     dbgOut( m_aDevice );
477 }
478 
479 void SvpSalGraphics::drawMask( const SalTwoRect* pPosAry,
480                                const SalBitmap& rSalBitmap,
481                                SalColor nMaskColor )
482 {
483     const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSalBitmap);
484     B2IRange aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
485                        pPosAry->mnSrcX+pPosAry->mnSrcWidth,
486                        pPosAry->mnSrcY+pPosAry->mnSrcHeight );
487     B2IPoint aDestPoint( pPosAry->mnDestX, pPosAry->mnDestY );
488 
489     // BitmapDevice::drawMaskedColor works with 0==transparent,
490     // 255==opaque. drawMask() semantic is the other way
491     // around. Therefore, invert mask.
492     BitmapDeviceSharedPtr aCopy =
493         cloneBitmapDevice( B2IVector( pPosAry->mnSrcWidth, pPosAry->mnSrcHeight ),
494                            rSrc.getBitmap() );
495     basebmp::Color aBgColor( COL_WHITE );
496     aCopy->clear(aBgColor);
497     basebmp::Color aFgColor( COL_BLACK );
498     aCopy->drawMaskedColor( aFgColor, rSrc.getBitmap(), aSrcRect, B2IPoint() );
499 
500     basebmp::Color aColor( nMaskColor );
501     B2IRange aSrcRect2( 0, 0, pPosAry->mnSrcWidth, pPosAry->mnSrcHeight );
502     m_aDevice->drawMaskedColor( aColor, aCopy, aSrcRect, aDestPoint, m_aClipMap );
503     dbgOut( m_aDevice );
504 }
505 
506 SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeight )
507 {
508     BitmapDeviceSharedPtr aCopy =
509         cloneBitmapDevice( B2IVector( nWidth, nHeight ),
510                            m_aDevice );
511     B2IRange aSrcRect( nX, nY, nX+nWidth, nY+nHeight );
512     B2IRange aDestRect( 0, 0, nWidth, nHeight );
513     aCopy->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT );
514 
515     SvpSalBitmap* pBitmap = new SvpSalBitmap();
516     pBitmap->setBitmap( aCopy );
517     return pBitmap;
518 }
519 
520 SalColor SvpSalGraphics::getPixel( long nX, long nY )
521 {
522     basebmp::Color aColor( m_aDevice->getPixel( B2IPoint( nX, nY ) ) );
523     return aColor.toInt32();
524 }
525 
526 void SvpSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInvert /*nFlags*/ )
527 {
528     // FIXME: handle SAL_INVERT_50 and SAL_INVERT_TRACKFRAME
529     B2DPolygon aRect = tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nWidth, nY+nHeight ) );
530     B2DPolyPolygon aPolyPoly( aRect );
531     m_aDevice->fillPolyPolygon( aPolyPoly, basebmp::Color( 0xffffff ), DrawMode_XOR, m_aClipMap );
532     dbgOut( m_aDevice );
533 }
534 
535 void SvpSalGraphics::invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert /*nFlags*/ )
536 {
537     // FIXME: handle SAL_INVERT_50 and SAL_INVERT_TRACKFRAME
538     B2DPolygon aPoly;
539     aPoly.append( B2DPoint( pPtAry->mnX, pPtAry->mnY ), nPoints );
540     for( sal_uLong i = 1; i < nPoints; i++ )
541         aPoly.setB2DPoint( i, B2DPoint( pPtAry[i].mnX, pPtAry[i].mnY ) );
542     aPoly.setClosed( true );
543     m_aDevice->fillPolyPolygon( B2DPolyPolygon(aPoly), basebmp::Color( 0xffffff ), DrawMode_XOR, m_aClipMap );
544     dbgOut( m_aDevice );
545 }
546 
547 sal_Bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong )
548 {
549     return sal_False;
550 }
551 
552 SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const
553 {
554     SystemFontData aSysFontData;
555 
556     if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
557     if (nFallbacklevel < 0 ) nFallbacklevel = 0;
558 
559     aSysFontData.nSize = sizeof( SystemFontData );
560     aSysFontData.nFontId = 0;
561     aSysFontData.nFontFlags = 0;
562     aSysFontData.bFakeBold = false;
563     aSysFontData.bFakeItalic = false;
564     aSysFontData.bAntialias = true;
565     return aSysFontData;
566 }
567 
568 SystemGraphicsData SvpSalGraphics::GetGraphicsData() const
569 {
570     SystemGraphicsData aRes;
571     aRes.nSize = sizeof(aRes);
572 	aRes.hDrawable = 0;
573 	aRes.pRenderFormat = 0;
574     return aRes;
575 }
576 
577 bool SvpSalGraphics::supportsOperation( OutDevSupportType ) const
578 {
579     return false;
580 }
581 
582