1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_vcl.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir // bootstrap stuff 32*cdf0e10cSrcweir #include <rtl/bootstrap.hxx> 33*cdf0e10cSrcweir #include <comphelper/processfactory.hxx> 34*cdf0e10cSrcweir #include <comphelper/regpathhelper.hxx> 35*cdf0e10cSrcweir #include <cppuhelper/servicefactory.hxx> 36*cdf0e10cSrcweir #include <cppuhelper/bootstrap.hxx> 37*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/registry/XSimpleRegistry.hpp> 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir #include <ucbhelper/contentbroker.hxx> 42*cdf0e10cSrcweir #include <ucbhelper/configurationkeys.hxx> 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir #include <vcl/svapp.hxx> 45*cdf0e10cSrcweir #include <vcl/dialog.hxx> 46*cdf0e10cSrcweir #include <vcl/outdev.hxx> 47*cdf0e10cSrcweir #include <vcl/virdev.hxx> 48*cdf0e10cSrcweir #include <vcl/hatch.hxx> 49*cdf0e10cSrcweir #include <vcl/bitmap.hxx> 50*cdf0e10cSrcweir #include <vcl/wall.hxx> 51*cdf0e10cSrcweir #include <vcl/image.hxx> 52*cdf0e10cSrcweir #include <vcl/gdimtf.hxx> 53*cdf0e10cSrcweir #include <vcl/metaact.hxx> 54*cdf0e10cSrcweir #include <vcl/bitmapex.hxx> 55*cdf0e10cSrcweir #include <vcl/gradient.hxx> 56*cdf0e10cSrcweir #include <vcl/lineinfo.hxx> 57*cdf0e10cSrcweir #include <tools/string.hxx> 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir #include <osl/time.h> 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir #include <boost/function.hpp> 62*cdf0e10cSrcweir #include <boost/bind.hpp> 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir #include <stdio.h> 65*cdf0e10cSrcweir #include <unistd.h> 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir using namespace ::com::sun::star; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir namespace 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir class GrindApp : public Application 74*cdf0e10cSrcweir { 75*cdf0e10cSrcweir public: 76*cdf0e10cSrcweir virtual void Main(); 77*cdf0e10cSrcweir virtual sal_uInt16 Exception( sal_uInt16 nError ); 78*cdf0e10cSrcweir }; 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir class TestWindow : public Dialog 81*cdf0e10cSrcweir { 82*cdf0e10cSrcweir public: 83*cdf0e10cSrcweir TestWindow() : Dialog( (Window *) NULL ) 84*cdf0e10cSrcweir { 85*cdf0e10cSrcweir SetText( rtl::OUString::createFromAscii( "OutDev grinding" ) ); 86*cdf0e10cSrcweir SetSizePixel( Size( 1024, 1024 ) ); 87*cdf0e10cSrcweir EnablePaint( true ); 88*cdf0e10cSrcweir Show(); 89*cdf0e10cSrcweir } 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir virtual ~TestWindow() {} 92*cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 93*cdf0e10cSrcweir }; 94*cdf0e10cSrcweir 95*cdf0e10cSrcweir //---------------------------------------------------------------------------------- 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir typedef boost::function1<void, OutputDevice*> functor_type; 98*cdf0e10cSrcweir typedef std::vector< std::pair<const char*, 99*cdf0e10cSrcweir functor_type> > functor_vector_type; 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir template< typename Functor > void add( functor_vector_type& res, 102*cdf0e10cSrcweir const char* pStr, 103*cdf0e10cSrcweir const Functor& func ) 104*cdf0e10cSrcweir { 105*cdf0e10cSrcweir res.push_back( std::make_pair(pStr,functor_type(func)) ); 106*cdf0e10cSrcweir } 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir void setupMethodStubs( functor_vector_type& res ) 109*cdf0e10cSrcweir { 110*cdf0e10cSrcweir const Color aWhiteColor( COL_WHITE ); 111*cdf0e10cSrcweir const Color aBlackColor( COL_BLACK ); 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir const Point aPt1(10,10); 114*cdf0e10cSrcweir const Point aPt2(500,500); 115*cdf0e10cSrcweir const Point aPt3(0,0); 116*cdf0e10cSrcweir const Point aPt4(450,450); 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir const Rectangle aRect(aPt1,aPt2); 119*cdf0e10cSrcweir const Rectangle aRect2(aPt3,aPt4); 120*cdf0e10cSrcweir const Polygon aPoly(aRect); 121*cdf0e10cSrcweir const Polygon aPoly2(aRect2); 122*cdf0e10cSrcweir PolyPolygon aPolyPoly(aPoly); 123*cdf0e10cSrcweir aPolyPoly.Insert( aPoly2 ); 124*cdf0e10cSrcweir Polygon aPoly3(aPoly2); 125*cdf0e10cSrcweir aPoly3.Rotate( aPoly3.GetBoundRect().Center(), 126*cdf0e10cSrcweir 900 ); 127*cdf0e10cSrcweir 128*cdf0e10cSrcweir const String aString( ByteString("This is a test"), 129*cdf0e10cSrcweir RTL_TEXTENCODING_ASCII_US ); 130*cdf0e10cSrcweir const LineInfo aLineInfo(LINE_SOLID,5); 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir // unfortunately, VDevs have inaccessible copy constructors 133*cdf0e10cSrcweir static VirtualDevice aVDev; 134*cdf0e10cSrcweir static VirtualDevice aVDevBW(1); 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir const Size aVDevSize; 137*cdf0e10cSrcweir aVDev.SetOutputSizePixel(aVDevSize); 138*cdf0e10cSrcweir aVDevBW.SetOutputSizePixel(aVDevSize); 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir const Bitmap aBitmap( aVDev.GetBitmap(aPt1,aVDevSize) ); 141*cdf0e10cSrcweir const Bitmap aBitmapBW( aVDevBW.GetBitmap(aPt1,aVDevSize) ); 142*cdf0e10cSrcweir const Bitmap aBitmapAlien( aVDevSize, 8 ); 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir const BitmapEx aBitmapEx( aBitmap, aBitmapBW ); 145*cdf0e10cSrcweir const BitmapEx aBitmapExBW( aBitmapBW, aBitmapBW ); 146*cdf0e10cSrcweir const BitmapEx aBitmapExAlien( aBitmapAlien, aBitmapBW ); 147*cdf0e10cSrcweir const BitmapEx aBitmapExAlpha( aBitmap, aBitmapAlien ); 148*cdf0e10cSrcweir const BitmapEx aBitmapExAlphaAlien( aBitmapAlien, aBitmapAlien ); 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir const Image aImage( aBitmapEx ); 151*cdf0e10cSrcweir const Gradient aGradient(GRADIENT_ELLIPTICAL,aBlackColor,aWhiteColor); 152*cdf0e10cSrcweir const Hatch aHatch(HatchStyle_TRIPLE,aBlackColor,4,450); 153*cdf0e10cSrcweir const Wallpaper aWallpaper( aWhiteColor ); 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir GDIMetaFile aMtf; 156*cdf0e10cSrcweir aMtf.AddAction( new MetaFillColorAction(Color(COL_RED),sal_True) ); 157*cdf0e10cSrcweir aMtf.AddAction( new MetaRectAction(aRect) ); 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir /* void DrawText( const Point& rStartPt, const XubString& rStr, 160*cdf0e10cSrcweir xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, 161*cdf0e10cSrcweir MetricVector* pVector = NULL, String* pDisplayText = NULL ); 162*cdf0e10cSrcweir */ 163*cdf0e10cSrcweir // add(res, 164*cdf0e10cSrcweir // "DrawText", 165*cdf0e10cSrcweir // boost::bind( 166*cdf0e10cSrcweir // &OutputDevice::DrawText, 167*cdf0e10cSrcweir // _1, 168*cdf0e10cSrcweir // aPt1, aString, (sal_uInt16)0, aString.Len(), (MetricVector*)0, (String*)0, (vcl::ITextLayout*)0 )); 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir /* void DrawTextArray( const Point& rStartPt, const XubString& rStr, 171*cdf0e10cSrcweir const sal_Int32* pDXAry = NULL, 172*cdf0e10cSrcweir xub_StrLen nIndex = 0, 173*cdf0e10cSrcweir xub_StrLen nLen = STRING_LEN ); 174*cdf0e10cSrcweir */ 175*cdf0e10cSrcweir add(res, 176*cdf0e10cSrcweir "DrawTextArray", 177*cdf0e10cSrcweir boost::bind( 178*cdf0e10cSrcweir &OutputDevice::DrawTextArray, 179*cdf0e10cSrcweir _1, 180*cdf0e10cSrcweir aPt1, aString, (const sal_Int32*)0, (sal_uInt16)0, aString.Len() )); 181*cdf0e10cSrcweir 182*cdf0e10cSrcweir /* void DrawPixel( const Point& rPt, const Color& rColor ); */ 183*cdf0e10cSrcweir add(res, 184*cdf0e10cSrcweir "DrawPixel", 185*cdf0e10cSrcweir boost::bind( 186*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Color& ))( 187*cdf0e10cSrcweir &OutputDevice::DrawPixel), 188*cdf0e10cSrcweir _1, 189*cdf0e10cSrcweir aPt1, aBlackColor )); 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir /* void DrawLine( const Point& rStartPt, const Point& rEndPt ); */ 192*cdf0e10cSrcweir add(res, 193*cdf0e10cSrcweir "DrawLine", 194*cdf0e10cSrcweir boost::bind( 195*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Point& ))( 196*cdf0e10cSrcweir &OutputDevice::DrawLine), 197*cdf0e10cSrcweir _1, 198*cdf0e10cSrcweir aPt1, aPt2 )); 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir /* void DrawLine( const Point& rStartPt, const Point& rEndPt, 201*cdf0e10cSrcweir const LineInfo& rLineInfo ); 202*cdf0e10cSrcweir */ 203*cdf0e10cSrcweir add(res, 204*cdf0e10cSrcweir "DrawLine(LineInfo)", 205*cdf0e10cSrcweir boost::bind( 206*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Point&,const LineInfo& ))( 207*cdf0e10cSrcweir &OutputDevice::DrawLine), 208*cdf0e10cSrcweir _1, 209*cdf0e10cSrcweir aPt1, aPt2, aLineInfo )); 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir /* void DrawPolyLine( const Polygon& rPoly ); */ 212*cdf0e10cSrcweir add(res, 213*cdf0e10cSrcweir "DrawPolyLine", 214*cdf0e10cSrcweir boost::bind( 215*cdf0e10cSrcweir (void (OutputDevice::*)( const Polygon& ))( 216*cdf0e10cSrcweir &OutputDevice::DrawPolyLine), 217*cdf0e10cSrcweir _1, 218*cdf0e10cSrcweir aPoly )); 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir /* void DrawPolyLine( const Polygon& rPoly, 221*cdf0e10cSrcweir const LineInfo& rLineInfo ); 222*cdf0e10cSrcweir */ 223*cdf0e10cSrcweir add(res, 224*cdf0e10cSrcweir "DrawPolyLine(LineInfo)", 225*cdf0e10cSrcweir boost::bind( 226*cdf0e10cSrcweir (void (OutputDevice::*)( const Polygon&, const LineInfo& ))( 227*cdf0e10cSrcweir &OutputDevice::DrawPolyLine), 228*cdf0e10cSrcweir _1, 229*cdf0e10cSrcweir aPoly, aLineInfo )); 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir /* void DrawPolygon( const Polygon& rPoly ); */ 232*cdf0e10cSrcweir add(res, 233*cdf0e10cSrcweir "DrawPolygon", 234*cdf0e10cSrcweir boost::bind( 235*cdf0e10cSrcweir (void (OutputDevice::*)( const Polygon& )) 236*cdf0e10cSrcweir &OutputDevice::DrawPolygon, 237*cdf0e10cSrcweir _1, 238*cdf0e10cSrcweir aPoly )); 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir /* void DrawPolyPolygon( const PolyPolygon& rPolyPoly ); */ 241*cdf0e10cSrcweir add(res, 242*cdf0e10cSrcweir "DrawPolyPolygon", 243*cdf0e10cSrcweir boost::bind( 244*cdf0e10cSrcweir (void (OutputDevice::*)( const PolyPolygon& )) 245*cdf0e10cSrcweir &OutputDevice::DrawPolyPolygon, 246*cdf0e10cSrcweir _1, 247*cdf0e10cSrcweir aPolyPoly )); 248*cdf0e10cSrcweir 249*cdf0e10cSrcweir /* void DrawRect( const Rectangle& rRect ); */ 250*cdf0e10cSrcweir add(res, 251*cdf0e10cSrcweir "DrawRect", 252*cdf0e10cSrcweir boost::bind( 253*cdf0e10cSrcweir (void (OutputDevice::*)( const Rectangle& ))( 254*cdf0e10cSrcweir &OutputDevice::DrawRect), 255*cdf0e10cSrcweir _1, 256*cdf0e10cSrcweir aRect )); 257*cdf0e10cSrcweir 258*cdf0e10cSrcweir /* void DrawRect( const Rectangle& rRect, 259*cdf0e10cSrcweir sal_uLong nHorzRount, sal_uLong nVertRound ); 260*cdf0e10cSrcweir */ 261*cdf0e10cSrcweir add(res, 262*cdf0e10cSrcweir "DrawRect(round corners)", 263*cdf0e10cSrcweir boost::bind( 264*cdf0e10cSrcweir (void (OutputDevice::*)( const Rectangle&, sal_uLong nHorzRount, sal_uLong nVertRound ))( 265*cdf0e10cSrcweir &OutputDevice::DrawRect), 266*cdf0e10cSrcweir _1, 267*cdf0e10cSrcweir aRect2, 268*cdf0e10cSrcweir 4,4)); 269*cdf0e10cSrcweir 270*cdf0e10cSrcweir /* void DrawEllipse( const Rectangle& rRect ); */ 271*cdf0e10cSrcweir add(res, 272*cdf0e10cSrcweir "DrawEllipse", 273*cdf0e10cSrcweir boost::bind( 274*cdf0e10cSrcweir &OutputDevice::DrawEllipse, 275*cdf0e10cSrcweir _1, 276*cdf0e10cSrcweir aRect )); 277*cdf0e10cSrcweir 278*cdf0e10cSrcweir /* void DrawArc( const Rectangle& rRect, 279*cdf0e10cSrcweir const Point& rStartPt, const Point& rEndPt ); 280*cdf0e10cSrcweir */ 281*cdf0e10cSrcweir add(res, 282*cdf0e10cSrcweir "DrawArc", 283*cdf0e10cSrcweir boost::bind( 284*cdf0e10cSrcweir &OutputDevice::DrawArc, 285*cdf0e10cSrcweir _1, 286*cdf0e10cSrcweir aRect,aPt1,aPt2 )); 287*cdf0e10cSrcweir 288*cdf0e10cSrcweir /* void DrawPie( const Rectangle& rRect, 289*cdf0e10cSrcweir const Point& rStartPt, const Point& rEndPt ); 290*cdf0e10cSrcweir */ 291*cdf0e10cSrcweir add(res, 292*cdf0e10cSrcweir "DrawPie", 293*cdf0e10cSrcweir boost::bind( 294*cdf0e10cSrcweir &OutputDevice::DrawPie, 295*cdf0e10cSrcweir _1, 296*cdf0e10cSrcweir aRect2,aPt3,aPt4 )); 297*cdf0e10cSrcweir 298*cdf0e10cSrcweir /* void DrawChord( const Rectangle& rRect, 299*cdf0e10cSrcweir const Point& rStartPt, const Point& rEndPt ); 300*cdf0e10cSrcweir */ 301*cdf0e10cSrcweir add(res, 302*cdf0e10cSrcweir "DrawChord", 303*cdf0e10cSrcweir boost::bind( 304*cdf0e10cSrcweir &OutputDevice::DrawChord, 305*cdf0e10cSrcweir _1, 306*cdf0e10cSrcweir aRect2,aPt3,aPt4 )); 307*cdf0e10cSrcweir 308*cdf0e10cSrcweir /* void DrawOutDev( const Point& rDestPt, const Size& rDestSize, 309*cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSize ); 310*cdf0e10cSrcweir */ 311*cdf0e10cSrcweir add(res, 312*cdf0e10cSrcweir "DrawOutDev", 313*cdf0e10cSrcweir boost::bind( 314*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Size&, 315*cdf0e10cSrcweir const Point&, const Size& ))( 316*cdf0e10cSrcweir &OutputDevice::DrawOutDev), 317*cdf0e10cSrcweir _1, 318*cdf0e10cSrcweir aRect2.TopLeft(), aRect2.GetSize(), 319*cdf0e10cSrcweir aRect.TopLeft(), aRect.GetSize())); 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir /* void DrawOutDev( const Point& rDestPt, const Size& rDestSize, 322*cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSize, 323*cdf0e10cSrcweir const OutputDevice& rOutDev ); 324*cdf0e10cSrcweir */ 325*cdf0e10cSrcweir add(res, 326*cdf0e10cSrcweir "DrawOutDev(foreign source)", 327*cdf0e10cSrcweir boost::bind( 328*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Size&, 329*cdf0e10cSrcweir const Point&, const Size&, 330*cdf0e10cSrcweir const OutputDevice& ))( 331*cdf0e10cSrcweir &OutputDevice::DrawOutDev), 332*cdf0e10cSrcweir _1, 333*cdf0e10cSrcweir aRect2.TopLeft(), aRect2.GetSize(), 334*cdf0e10cSrcweir aRect.TopLeft(), aRect.GetSize(), 335*cdf0e10cSrcweir boost::cref(aVDevBW) )); 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir /* void DrawOutDev( const Point& rDestPt, const Size& rDestSize, 338*cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSize, 339*cdf0e10cSrcweir const OutputDevice& rOutDev ); 340*cdf0e10cSrcweir */ 341*cdf0e10cSrcweir add(res, 342*cdf0e10cSrcweir "DrawOutDev(foreign source, scaled)", 343*cdf0e10cSrcweir boost::bind( 344*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Size&, 345*cdf0e10cSrcweir const Point&, const Size&, 346*cdf0e10cSrcweir const OutputDevice& ))( 347*cdf0e10cSrcweir &OutputDevice::DrawOutDev), 348*cdf0e10cSrcweir _1, 349*cdf0e10cSrcweir aRect2.TopLeft(), aRect2.GetSize(), 350*cdf0e10cSrcweir aRect.TopLeft(), aRect.GetSize(), 351*cdf0e10cSrcweir boost::cref(aVDev) )); 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir /* void CopyArea( const Point& rDestPt, 354*cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSize, 355*cdf0e10cSrcweir sal_uInt16 nFlags = 0 ); 356*cdf0e10cSrcweir */ 357*cdf0e10cSrcweir add(res, 358*cdf0e10cSrcweir "CopyArea", 359*cdf0e10cSrcweir boost::bind( 360*cdf0e10cSrcweir &OutputDevice::CopyArea, 361*cdf0e10cSrcweir _1, 362*cdf0e10cSrcweir aPt1,aPt3,aRect2.GetSize(),(sal_uInt16)0 )); 363*cdf0e10cSrcweir 364*cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, 365*cdf0e10cSrcweir const Bitmap& rBitmap ); 366*cdf0e10cSrcweir */ 367*cdf0e10cSrcweir add(res, 368*cdf0e10cSrcweir "DrawBitmap(alien source)", 369*cdf0e10cSrcweir boost::bind( 370*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 371*cdf0e10cSrcweir const Bitmap& ))( 372*cdf0e10cSrcweir &OutputDevice::DrawBitmap), 373*cdf0e10cSrcweir _1, 374*cdf0e10cSrcweir aPt1,aBitmapAlien )); 375*cdf0e10cSrcweir 376*cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, 377*cdf0e10cSrcweir const Bitmap& rBitmap ); 378*cdf0e10cSrcweir */ 379*cdf0e10cSrcweir add(res, 380*cdf0e10cSrcweir "DrawBitmap", 381*cdf0e10cSrcweir boost::bind( 382*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 383*cdf0e10cSrcweir const Bitmap& ))( 384*cdf0e10cSrcweir &OutputDevice::DrawBitmap), 385*cdf0e10cSrcweir _1, 386*cdf0e10cSrcweir aPt1,aBitmap )); 387*cdf0e10cSrcweir 388*cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, const Size& rDestSize, 389*cdf0e10cSrcweir const Bitmap& rBitmap ); 390*cdf0e10cSrcweir */ 391*cdf0e10cSrcweir add(res, 392*cdf0e10cSrcweir "DrawBitmap(scaled,alien source)", 393*cdf0e10cSrcweir boost::bind( 394*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 395*cdf0e10cSrcweir const Size&, 396*cdf0e10cSrcweir const Bitmap& ))( 397*cdf0e10cSrcweir &OutputDevice::DrawBitmap), 398*cdf0e10cSrcweir _1, 399*cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapAlien )); 400*cdf0e10cSrcweir 401*cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, const Size& rDestSize, 402*cdf0e10cSrcweir const Bitmap& rBitmap ); 403*cdf0e10cSrcweir */ 404*cdf0e10cSrcweir add(res, 405*cdf0e10cSrcweir "DrawBitmap(scaled)", 406*cdf0e10cSrcweir boost::bind( 407*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 408*cdf0e10cSrcweir const Size&, 409*cdf0e10cSrcweir const Bitmap& ))( 410*cdf0e10cSrcweir &OutputDevice::DrawBitmap), 411*cdf0e10cSrcweir _1, 412*cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmap )); 413*cdf0e10cSrcweir 414*cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, const Size& rDestSize, 415*cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 416*cdf0e10cSrcweir const Bitmap& rBitmap ); 417*cdf0e10cSrcweir */ 418*cdf0e10cSrcweir add(res, 419*cdf0e10cSrcweir "DrawBitmap(scaled subset,alien source)", 420*cdf0e10cSrcweir boost::bind( 421*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 422*cdf0e10cSrcweir const Size&, 423*cdf0e10cSrcweir const Point&, 424*cdf0e10cSrcweir const Size&, 425*cdf0e10cSrcweir const Bitmap& ))( 426*cdf0e10cSrcweir &OutputDevice::DrawBitmap), 427*cdf0e10cSrcweir _1, 428*cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapAlien )); 429*cdf0e10cSrcweir 430*cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, const Size& rDestSize, 431*cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 432*cdf0e10cSrcweir const Bitmap& rBitmap ); 433*cdf0e10cSrcweir */ 434*cdf0e10cSrcweir add(res, 435*cdf0e10cSrcweir "DrawBitmap(scaled subset)", 436*cdf0e10cSrcweir boost::bind( 437*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 438*cdf0e10cSrcweir const Size&, 439*cdf0e10cSrcweir const Point&, 440*cdf0e10cSrcweir const Size&, 441*cdf0e10cSrcweir const Bitmap& ))( 442*cdf0e10cSrcweir &OutputDevice::DrawBitmap), 443*cdf0e10cSrcweir _1, 444*cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmap )); 445*cdf0e10cSrcweir 446*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, 447*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 448*cdf0e10cSrcweir */ 449*cdf0e10cSrcweir add(res, 450*cdf0e10cSrcweir "DrawBitmapEx(alien source)", 451*cdf0e10cSrcweir boost::bind( 452*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 453*cdf0e10cSrcweir const BitmapEx& ))( 454*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 455*cdf0e10cSrcweir _1, 456*cdf0e10cSrcweir aPt1,aBitmapExAlien )); 457*cdf0e10cSrcweir 458*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, 459*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 460*cdf0e10cSrcweir */ 461*cdf0e10cSrcweir add(res, 462*cdf0e10cSrcweir "DrawBitmapEx", 463*cdf0e10cSrcweir boost::bind( 464*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 465*cdf0e10cSrcweir const BitmapEx& ))( 466*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 467*cdf0e10cSrcweir _1, 468*cdf0e10cSrcweir aPt1,aBitmapEx )); 469*cdf0e10cSrcweir 470*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, 471*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 472*cdf0e10cSrcweir */ 473*cdf0e10cSrcweir add(res, 474*cdf0e10cSrcweir "DrawBitmapEx(alpha)", 475*cdf0e10cSrcweir boost::bind( 476*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 477*cdf0e10cSrcweir const BitmapEx& ))( 478*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 479*cdf0e10cSrcweir _1, 480*cdf0e10cSrcweir aPt1,aBitmapExAlpha )); 481*cdf0e10cSrcweir 482*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, 483*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 484*cdf0e10cSrcweir */ 485*cdf0e10cSrcweir add(res, 486*cdf0e10cSrcweir "DrawBitmapEx(alpha, alien source)", 487*cdf0e10cSrcweir boost::bind( 488*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 489*cdf0e10cSrcweir const BitmapEx& ))( 490*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 491*cdf0e10cSrcweir _1, 492*cdf0e10cSrcweir aPt1,aBitmapExAlphaAlien )); 493*cdf0e10cSrcweir 494*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 495*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 496*cdf0e10cSrcweir */ 497*cdf0e10cSrcweir add(res, 498*cdf0e10cSrcweir "DrawBitmapEx(scaled,alien source)", 499*cdf0e10cSrcweir boost::bind( 500*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 501*cdf0e10cSrcweir const Size&, 502*cdf0e10cSrcweir const BitmapEx& ))( 503*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 504*cdf0e10cSrcweir _1, 505*cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapExAlien )); 506*cdf0e10cSrcweir 507*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 508*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 509*cdf0e10cSrcweir */ 510*cdf0e10cSrcweir add(res, 511*cdf0e10cSrcweir "DrawBitmapEx(scaled)", 512*cdf0e10cSrcweir boost::bind( 513*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 514*cdf0e10cSrcweir const Size&, 515*cdf0e10cSrcweir const BitmapEx& ))( 516*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 517*cdf0e10cSrcweir _1, 518*cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapEx )); 519*cdf0e10cSrcweir 520*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 521*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 522*cdf0e10cSrcweir */ 523*cdf0e10cSrcweir add(res, 524*cdf0e10cSrcweir "DrawBitmapEx(scaled alpha)", 525*cdf0e10cSrcweir boost::bind( 526*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 527*cdf0e10cSrcweir const Size&, 528*cdf0e10cSrcweir const BitmapEx& ))( 529*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 530*cdf0e10cSrcweir _1, 531*cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapExAlpha )); 532*cdf0e10cSrcweir 533*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 534*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 535*cdf0e10cSrcweir */ 536*cdf0e10cSrcweir add(res, 537*cdf0e10cSrcweir "DrawBitmapEx(scaled alpha, alien source)", 538*cdf0e10cSrcweir boost::bind( 539*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 540*cdf0e10cSrcweir const Size&, 541*cdf0e10cSrcweir const BitmapEx& ))( 542*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 543*cdf0e10cSrcweir _1, 544*cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapExAlphaAlien )); 545*cdf0e10cSrcweir 546*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 547*cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 548*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 549*cdf0e10cSrcweir */ 550*cdf0e10cSrcweir add(res, 551*cdf0e10cSrcweir "DrawBitmapEx(scaled subset,alien source)", 552*cdf0e10cSrcweir boost::bind( 553*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 554*cdf0e10cSrcweir const Size&, 555*cdf0e10cSrcweir const Point&, 556*cdf0e10cSrcweir const Size&, 557*cdf0e10cSrcweir const BitmapEx& ))( 558*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 559*cdf0e10cSrcweir _1, 560*cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapExAlien )); 561*cdf0e10cSrcweir 562*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 563*cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 564*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 565*cdf0e10cSrcweir */ 566*cdf0e10cSrcweir add(res, 567*cdf0e10cSrcweir "DrawBitmapEx(scaled subset)", 568*cdf0e10cSrcweir boost::bind( 569*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 570*cdf0e10cSrcweir const Size&, 571*cdf0e10cSrcweir const Point&, 572*cdf0e10cSrcweir const Size&, 573*cdf0e10cSrcweir const BitmapEx& ))( 574*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 575*cdf0e10cSrcweir _1, 576*cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapEx )); 577*cdf0e10cSrcweir 578*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 579*cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 580*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 581*cdf0e10cSrcweir */ 582*cdf0e10cSrcweir add(res, 583*cdf0e10cSrcweir "DrawBitmapEx(scaled subset, alpha)", 584*cdf0e10cSrcweir boost::bind( 585*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 586*cdf0e10cSrcweir const Size&, 587*cdf0e10cSrcweir const Point&, 588*cdf0e10cSrcweir const Size&, 589*cdf0e10cSrcweir const BitmapEx& ))( 590*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 591*cdf0e10cSrcweir _1, 592*cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapExAlpha )); 593*cdf0e10cSrcweir 594*cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 595*cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 596*cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 597*cdf0e10cSrcweir */ 598*cdf0e10cSrcweir add(res, 599*cdf0e10cSrcweir "DrawBitmapEx(scaled subset, alpha alien source)", 600*cdf0e10cSrcweir boost::bind( 601*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 602*cdf0e10cSrcweir const Size&, 603*cdf0e10cSrcweir const Point&, 604*cdf0e10cSrcweir const Size&, 605*cdf0e10cSrcweir const BitmapEx& ))( 606*cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 607*cdf0e10cSrcweir _1, 608*cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapExAlphaAlien )); 609*cdf0e10cSrcweir 610*cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, 611*cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 612*cdf0e10cSrcweir */ 613*cdf0e10cSrcweir add(res, 614*cdf0e10cSrcweir "DrawMask(alien source)", 615*cdf0e10cSrcweir boost::bind( 616*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 617*cdf0e10cSrcweir const Bitmap&, 618*cdf0e10cSrcweir const Color& ))( 619*cdf0e10cSrcweir &OutputDevice::DrawMask), 620*cdf0e10cSrcweir _1, 621*cdf0e10cSrcweir aPt1,aBitmapAlien,aBlackColor )); 622*cdf0e10cSrcweir 623*cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, 624*cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 625*cdf0e10cSrcweir */ 626*cdf0e10cSrcweir add(res, 627*cdf0e10cSrcweir "DrawMask", 628*cdf0e10cSrcweir boost::bind( 629*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 630*cdf0e10cSrcweir const Bitmap&, 631*cdf0e10cSrcweir const Color& ))( 632*cdf0e10cSrcweir &OutputDevice::DrawMask), 633*cdf0e10cSrcweir _1, 634*cdf0e10cSrcweir aPt1,aBitmap,aBlackColor )); 635*cdf0e10cSrcweir 636*cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, const Size& rDestSize, 637*cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 638*cdf0e10cSrcweir */ 639*cdf0e10cSrcweir add(res, 640*cdf0e10cSrcweir "DrawMask(scaled,alien source)", 641*cdf0e10cSrcweir boost::bind( 642*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 643*cdf0e10cSrcweir const Size&, 644*cdf0e10cSrcweir const Bitmap&, 645*cdf0e10cSrcweir const Color& ))( 646*cdf0e10cSrcweir &OutputDevice::DrawMask), 647*cdf0e10cSrcweir _1, 648*cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapAlien, aBlackColor )); 649*cdf0e10cSrcweir 650*cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, const Size& rDestSize, 651*cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 652*cdf0e10cSrcweir */ 653*cdf0e10cSrcweir add(res, 654*cdf0e10cSrcweir "DrawMask(scaled)", 655*cdf0e10cSrcweir boost::bind( 656*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 657*cdf0e10cSrcweir const Size&, 658*cdf0e10cSrcweir const Bitmap&, 659*cdf0e10cSrcweir const Color& ))( 660*cdf0e10cSrcweir &OutputDevice::DrawMask), 661*cdf0e10cSrcweir _1, 662*cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmap,aBlackColor )); 663*cdf0e10cSrcweir 664*cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, const Size& rDestSize, 665*cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 666*cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 667*cdf0e10cSrcweir */ 668*cdf0e10cSrcweir add(res, 669*cdf0e10cSrcweir "DrawMask(scaled subset,alien source)", 670*cdf0e10cSrcweir boost::bind( 671*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 672*cdf0e10cSrcweir const Size&, 673*cdf0e10cSrcweir const Point&, 674*cdf0e10cSrcweir const Size&, 675*cdf0e10cSrcweir const Bitmap&, 676*cdf0e10cSrcweir const Color& ))( 677*cdf0e10cSrcweir &OutputDevice::DrawMask), 678*cdf0e10cSrcweir _1, 679*cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapAlien,aBlackColor )); 680*cdf0e10cSrcweir 681*cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, const Size& rDestSize, 682*cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 683*cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 684*cdf0e10cSrcweir */ 685*cdf0e10cSrcweir add(res, 686*cdf0e10cSrcweir "DrawMask(scaled subset)", 687*cdf0e10cSrcweir boost::bind( 688*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 689*cdf0e10cSrcweir const Size&, 690*cdf0e10cSrcweir const Point&, 691*cdf0e10cSrcweir const Size&, 692*cdf0e10cSrcweir const Bitmap&, 693*cdf0e10cSrcweir const Color& ))( 694*cdf0e10cSrcweir &OutputDevice::DrawMask), 695*cdf0e10cSrcweir _1, 696*cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmap,aBlackColor )); 697*cdf0e10cSrcweir 698*cdf0e10cSrcweir /* void DrawImage( const Point& rPos, 699*cdf0e10cSrcweir const Image& rImage, sal_uInt16 nStyle = 0 ); 700*cdf0e10cSrcweir */ 701*cdf0e10cSrcweir add(res, 702*cdf0e10cSrcweir "DrawImage", 703*cdf0e10cSrcweir boost::bind( 704*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 705*cdf0e10cSrcweir const Image&, 706*cdf0e10cSrcweir sal_uInt16 nStyle ))( 707*cdf0e10cSrcweir &OutputDevice::DrawImage), 708*cdf0e10cSrcweir _1, 709*cdf0e10cSrcweir aPt1,aImage,(sal_uInt16)0 )); 710*cdf0e10cSrcweir 711*cdf0e10cSrcweir /* void DrawImage( const Point& rPos, const Size& rSize, 712*cdf0e10cSrcweir const Image& rImage, sal_uInt16 nStyle = 0 ); 713*cdf0e10cSrcweir */ 714*cdf0e10cSrcweir add(res, 715*cdf0e10cSrcweir "DrawImage(scaled)", 716*cdf0e10cSrcweir boost::bind( 717*cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 718*cdf0e10cSrcweir const Size&, 719*cdf0e10cSrcweir const Image&, 720*cdf0e10cSrcweir sal_uInt16 nStyle ))( 721*cdf0e10cSrcweir &OutputDevice::DrawImage), 722*cdf0e10cSrcweir _1, 723*cdf0e10cSrcweir aPt1,aRect.GetSize(),aImage,(sal_uInt16)0 )); 724*cdf0e10cSrcweir 725*cdf0e10cSrcweir /* void DrawGradient( const Rectangle& rRect, const Gradient& rGradient ); */ 726*cdf0e10cSrcweir add(res, 727*cdf0e10cSrcweir "DrawGradient", 728*cdf0e10cSrcweir boost::bind( 729*cdf0e10cSrcweir (void (OutputDevice::*)( const Rectangle&, const Gradient& ))( 730*cdf0e10cSrcweir &OutputDevice::DrawGradient), 731*cdf0e10cSrcweir _1, 732*cdf0e10cSrcweir aRect,aGradient )); 733*cdf0e10cSrcweir 734*cdf0e10cSrcweir /* void DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient ); */ 735*cdf0e10cSrcweir add(res, 736*cdf0e10cSrcweir "DrawGradient(polygon)", 737*cdf0e10cSrcweir boost::bind( 738*cdf0e10cSrcweir (void (OutputDevice::*)( const PolyPolygon&, const Gradient& ))( 739*cdf0e10cSrcweir &OutputDevice::DrawGradient), 740*cdf0e10cSrcweir _1, 741*cdf0e10cSrcweir aPoly3,aGradient )); 742*cdf0e10cSrcweir 743*cdf0e10cSrcweir /* void DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch ); */ 744*cdf0e10cSrcweir add(res, 745*cdf0e10cSrcweir "DrawHatch", 746*cdf0e10cSrcweir boost::bind( 747*cdf0e10cSrcweir &OutputDevice::DrawHatch, 748*cdf0e10cSrcweir _1, 749*cdf0e10cSrcweir aPoly3,aHatch )); 750*cdf0e10cSrcweir 751*cdf0e10cSrcweir /* void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper ); */ 752*cdf0e10cSrcweir add(res, 753*cdf0e10cSrcweir "DrawWallpaper", 754*cdf0e10cSrcweir boost::bind( 755*cdf0e10cSrcweir &OutputDevice::DrawWallpaper, 756*cdf0e10cSrcweir _1, 757*cdf0e10cSrcweir aRect2,aWallpaper )); 758*cdf0e10cSrcweir 759*cdf0e10cSrcweir /* void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, sal_uInt16 nStyle ); */ 760*cdf0e10cSrcweir add(res, 761*cdf0e10cSrcweir "DrawWaveLine", 762*cdf0e10cSrcweir boost::bind( 763*cdf0e10cSrcweir &OutputDevice::DrawWaveLine, 764*cdf0e10cSrcweir _1, 765*cdf0e10cSrcweir aPt1,aPt2,(sal_uInt16)WAVE_NORMAL )); 766*cdf0e10cSrcweir 767*cdf0e10cSrcweir /* void DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags ); */ 768*cdf0e10cSrcweir add(res, 769*cdf0e10cSrcweir "DrawGrid", 770*cdf0e10cSrcweir boost::bind( 771*cdf0e10cSrcweir &OutputDevice::DrawGrid, 772*cdf0e10cSrcweir _1, 773*cdf0e10cSrcweir aRect,Size(10,20),GRID_HORZLINES|GRID_VERTLINES )); 774*cdf0e10cSrcweir 775*cdf0e10cSrcweir /* void DrawTransparent( const PolyPolygon& rPolyPoly, 776*cdf0e10cSrcweir sal_uInt16 nTransparencePercent ); 777*cdf0e10cSrcweir */ 778*cdf0e10cSrcweir add(res, 779*cdf0e10cSrcweir "DrawTransparent", 780*cdf0e10cSrcweir boost::bind( 781*cdf0e10cSrcweir (void (OutputDevice::*)( const PolyPolygon&, sal_uInt16 ))( 782*cdf0e10cSrcweir &OutputDevice::DrawTransparent), 783*cdf0e10cSrcweir _1, 784*cdf0e10cSrcweir aPoly3,(sal_uInt16)50 )); 785*cdf0e10cSrcweir 786*cdf0e10cSrcweir /* void DrawTransparent( const GDIMetaFile& rMtf, 787*cdf0e10cSrcweir const Point& rPos, const Size& rSize, 788*cdf0e10cSrcweir const Gradient& rTransparenceGradient ); 789*cdf0e10cSrcweir */ 790*cdf0e10cSrcweir add(res, 791*cdf0e10cSrcweir "DrawTransparent(metafile)", 792*cdf0e10cSrcweir boost::bind( 793*cdf0e10cSrcweir (void (OutputDevice::*)( const GDIMetaFile&, 794*cdf0e10cSrcweir const Point&, 795*cdf0e10cSrcweir const Size&, 796*cdf0e10cSrcweir const Gradient& ))( 797*cdf0e10cSrcweir &OutputDevice::DrawTransparent), 798*cdf0e10cSrcweir _1, 799*cdf0e10cSrcweir aMtf,aPt1,aRect.GetSize(),aGradient )); 800*cdf0e10cSrcweir 801*cdf0e10cSrcweir /* void Erase(); */ 802*cdf0e10cSrcweir add(res, 803*cdf0e10cSrcweir "Erase", 804*cdf0e10cSrcweir boost::bind( 805*cdf0e10cSrcweir &OutputDevice::Erase, 806*cdf0e10cSrcweir _1 )); 807*cdf0e10cSrcweir 808*cdf0e10cSrcweir } 809*cdf0e10cSrcweir 810*cdf0e10cSrcweir //---------------------------------------------------------------------------------- 811*cdf0e10cSrcweir 812*cdf0e10cSrcweir void grindFunc( OutputDevice& rTarget, 813*cdf0e10cSrcweir functor_vector_type::const_iterator iter, 814*cdf0e10cSrcweir sal_Int32 nTurns, 815*cdf0e10cSrcweir const char* pMsg ) 816*cdf0e10cSrcweir { 817*cdf0e10cSrcweir const sal_uInt32 nStartTime( osl_getGlobalTimer() ); 818*cdf0e10cSrcweir 819*cdf0e10cSrcweir for( sal_Int32 i=0; i<nTurns; ++i ) 820*cdf0e10cSrcweir iter->second(&rTarget); 821*cdf0e10cSrcweir 822*cdf0e10cSrcweir if( rTarget.GetOutDevType() == OUTDEV_WINDOW ) 823*cdf0e10cSrcweir static_cast<Window&>(rTarget).Sync(); 824*cdf0e10cSrcweir 825*cdf0e10cSrcweir fprintf( stdout, 826*cdf0e10cSrcweir "Duration: %d ms (%d repetitions)\tOperation: %s\tSetup: %s\n", 827*cdf0e10cSrcweir (int)(osl_getGlobalTimer() - nStartTime), 828*cdf0e10cSrcweir (int)(nTurns), 829*cdf0e10cSrcweir iter->first, 830*cdf0e10cSrcweir pMsg ); 831*cdf0e10cSrcweir } 832*cdf0e10cSrcweir 833*cdf0e10cSrcweir //---------------------------------------------------------------------------------- 834*cdf0e10cSrcweir 835*cdf0e10cSrcweir /** Call OutputDevice render methods repeatedly, and output elapsed 836*cdf0e10cSrcweir time to stdout 837*cdf0e10cSrcweir */ 838*cdf0e10cSrcweir void outDevGrind( OutputDevice& rTarget, sal_Int32 nTurns=100 ) 839*cdf0e10cSrcweir { 840*cdf0e10cSrcweir // TODO(F1): also profile pure complex clip setup times! 841*cdf0e10cSrcweir 842*cdf0e10cSrcweir // State: fill/line color, draw mode, w/o clip, rect clip, complex clip 843*cdf0e10cSrcweir functor_vector_type aMethods; 844*cdf0e10cSrcweir setupMethodStubs( aMethods ); 845*cdf0e10cSrcweir 846*cdf0e10cSrcweir const Rectangle aClipRect(10,10,1000,1000); 847*cdf0e10cSrcweir const Polygon aPoly1( aClipRect ); 848*cdf0e10cSrcweir Polygon aPoly2( aClipRect ); 849*cdf0e10cSrcweir aPoly2.Rotate(aClipRect.Center(),450); 850*cdf0e10cSrcweir PolyPolygon aClipPoly(aPoly1); 851*cdf0e10cSrcweir aClipPoly.Insert(aPoly2); 852*cdf0e10cSrcweir 853*cdf0e10cSrcweir functor_vector_type::const_iterator iter = aMethods.begin(); 854*cdf0e10cSrcweir const functor_vector_type::const_iterator end = aMethods.end(); 855*cdf0e10cSrcweir while( iter != end ) 856*cdf0e10cSrcweir { 857*cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 858*cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 859*cdf0e10cSrcweir rTarget.SetRasterOp( ROP_OVERPAINT ); 860*cdf0e10cSrcweir rTarget.SetClipRegion(); 861*cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "w/o clip, w/o xor" ); 862*cdf0e10cSrcweir 863*cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 864*cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 865*cdf0e10cSrcweir rTarget.SetRasterOp( ROP_OVERPAINT ); 866*cdf0e10cSrcweir rTarget.SetClipRegion( aClipRect ); 867*cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "with rect clip, w/o xor" ); 868*cdf0e10cSrcweir 869*cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 870*cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 871*cdf0e10cSrcweir rTarget.SetRasterOp( ROP_OVERPAINT ); 872*cdf0e10cSrcweir rTarget.SetClipRegion( aClipPoly ); 873*cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "with complex clip, w/o xor" ); 874*cdf0e10cSrcweir 875*cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 876*cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 877*cdf0e10cSrcweir rTarget.SetRasterOp( ROP_XOR ); 878*cdf0e10cSrcweir rTarget.SetClipRegion(); 879*cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "w/o clip, with xor" ); 880*cdf0e10cSrcweir 881*cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 882*cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 883*cdf0e10cSrcweir rTarget.SetRasterOp( ROP_XOR ); 884*cdf0e10cSrcweir rTarget.SetClipRegion( aClipRect ); 885*cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "with rect clip, with xor" ); 886*cdf0e10cSrcweir 887*cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 888*cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 889*cdf0e10cSrcweir rTarget.SetRasterOp( ROP_XOR ); 890*cdf0e10cSrcweir rTarget.SetClipRegion( aClipPoly ); 891*cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "with complex clip, with xor" ); 892*cdf0e10cSrcweir 893*cdf0e10cSrcweir ++iter; 894*cdf0e10cSrcweir } 895*cdf0e10cSrcweir } 896*cdf0e10cSrcweir 897*cdf0e10cSrcweir //---------------------------------------------------------------------------------- 898*cdf0e10cSrcweir 899*cdf0e10cSrcweir void TestWindow::Paint( const Rectangle& ) 900*cdf0e10cSrcweir { 901*cdf0e10cSrcweir outDevGrind( *this ); 902*cdf0e10cSrcweir fflush( stdout ); 903*cdf0e10cSrcweir } 904*cdf0e10cSrcweir 905*cdf0e10cSrcweir sal_uInt16 GrindApp::Exception( sal_uInt16 nError ) 906*cdf0e10cSrcweir { 907*cdf0e10cSrcweir switch( nError & EXC_MAJORTYPE ) 908*cdf0e10cSrcweir { 909*cdf0e10cSrcweir case EXC_RSCNOTLOADED: 910*cdf0e10cSrcweir Abort( String::CreateFromAscii( 911*cdf0e10cSrcweir "Error: could not load language resources.\nPlease check your installation.\n" ) ); 912*cdf0e10cSrcweir break; 913*cdf0e10cSrcweir } 914*cdf0e10cSrcweir return 0; 915*cdf0e10cSrcweir } 916*cdf0e10cSrcweir 917*cdf0e10cSrcweir void GrindApp::Main() 918*cdf0e10cSrcweir { 919*cdf0e10cSrcweir bool bHelp = false; 920*cdf0e10cSrcweir 921*cdf0e10cSrcweir for( sal_uInt16 i = 0; i < GetCommandLineParamCount(); i++ ) 922*cdf0e10cSrcweir { 923*cdf0e10cSrcweir ::rtl::OUString aParam = GetCommandLineParam( i ); 924*cdf0e10cSrcweir 925*cdf0e10cSrcweir if( aParam.equalsAscii( "--help" ) || 926*cdf0e10cSrcweir aParam.equalsAscii( "-h" ) ) 927*cdf0e10cSrcweir bHelp = true; 928*cdf0e10cSrcweir } 929*cdf0e10cSrcweir 930*cdf0e10cSrcweir if( bHelp ) 931*cdf0e10cSrcweir { 932*cdf0e10cSrcweir printf( "outdevgrind - Profile OutputDevice\n" ); 933*cdf0e10cSrcweir return; 934*cdf0e10cSrcweir } 935*cdf0e10cSrcweir 936*cdf0e10cSrcweir //------------------------------------------------- 937*cdf0e10cSrcweir // create the global service-manager 938*cdf0e10cSrcweir //------------------------------------------------- 939*cdf0e10cSrcweir uno::Reference< lang::XMultiServiceFactory > xFactory; 940*cdf0e10cSrcweir try 941*cdf0e10cSrcweir { 942*cdf0e10cSrcweir uno::Reference< uno::XComponentContext > xCtx = ::cppu::defaultBootstrap_InitialComponentContext(); 943*cdf0e10cSrcweir xFactory = uno::Reference< lang::XMultiServiceFactory >( xCtx->getServiceManager(), 944*cdf0e10cSrcweir uno::UNO_QUERY ); 945*cdf0e10cSrcweir if( xFactory.is() ) 946*cdf0e10cSrcweir ::comphelper::setProcessServiceFactory( xFactory ); 947*cdf0e10cSrcweir } 948*cdf0e10cSrcweir catch( uno::Exception& ) 949*cdf0e10cSrcweir { 950*cdf0e10cSrcweir } 951*cdf0e10cSrcweir 952*cdf0e10cSrcweir if( !xFactory.is() ) 953*cdf0e10cSrcweir { 954*cdf0e10cSrcweir fprintf( stderr, 955*cdf0e10cSrcweir "Could not bootstrap UNO, installation must be in disorder. Exiting.\n" ); 956*cdf0e10cSrcweir exit( 1 ); 957*cdf0e10cSrcweir } 958*cdf0e10cSrcweir 959*cdf0e10cSrcweir // Create UCB. 960*cdf0e10cSrcweir uno::Sequence< uno::Any > aArgs( 2 ); 961*cdf0e10cSrcweir aArgs[ 0 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ); 962*cdf0e10cSrcweir aArgs[ 1 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ); 963*cdf0e10cSrcweir ::ucbhelper::ContentBroker::initialize( xFactory, aArgs ); 964*cdf0e10cSrcweir 965*cdf0e10cSrcweir TestWindow pWindow; 966*cdf0e10cSrcweir pWindow.Execute(); 967*cdf0e10cSrcweir 968*cdf0e10cSrcweir // clean up UCB 969*cdf0e10cSrcweir ::ucbhelper::ContentBroker::deinitialize(); 970*cdf0e10cSrcweir } 971*cdf0e10cSrcweir 972*cdf0e10cSrcweir } // namespace 973*cdf0e10cSrcweir 974*cdf0e10cSrcweir GrindApp aGrindApp; 975